diff options
author | hjk <[email protected]> | 2019-03-13 12:22:44 +0100 |
---|---|---|
committer | hjk <[email protected]> | 2019-03-19 15:56:17 +0000 |
commit | 1bc10248c06bf7248ca9c4e05013b492edc3210a (patch) | |
tree | 30e88bbfddb986de5ee36c60779603d03d4535e4 /src/plugins/android/androidplugin.cpp | |
parent | 404b284e8f234ca5c27d4a3f4db1af68cb799545 (diff) |
ProjectExplorer: Introduce a SimpleRunWorkerFactory template
... and use in as replacement for RunConfiguration::addRunWorkerFactory.
It is still convenient to have a simple way to set up run worker
factories for the typical "just run for this configuration" case,
but it's even better if it follows the nowadays predominant pattern
of keeping factories in the plugin's pimpl.
Also, it turned out there were two copies of
QmlProjectRunconfigurationFactory code, one is enough.
Change-Id: I0b28c4ea18d0f52165a49f6133dc8687a3b9c7cf
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'src/plugins/android/androidplugin.cpp')
-rw-r--r-- | src/plugins/android/androidplugin.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/android/androidplugin.cpp b/src/plugins/android/androidplugin.cpp index 7fa3153b4f2..607a29e7cac 100644 --- a/src/plugins/android/androidplugin.cpp +++ b/src/plugins/android/androidplugin.cpp @@ -85,10 +85,6 @@ public: registerRunConfiguration<Android::AndroidRunConfiguration> ("Qt4ProjectManager.AndroidRunConfiguration:"); addSupportedTargetDeviceType(Android::Constants::ANDROID_DEVICE_TYPE); - addRunWorkerFactory<AndroidRunSupport>(NORMAL_RUN_MODE); - addRunWorkerFactory<AndroidDebugSupport>(DEBUG_RUN_MODE); - addRunWorkerFactory<AndroidQmlToolingSupport>(QML_PROFILER_RUN_MODE); - addRunWorkerFactory<AndroidQmlToolingSupport>(QML_PREVIEW_RUN_MODE); } }; @@ -135,6 +131,13 @@ public: AndroidPackageInstallationFactory packackeInstallationFactory; AndroidManifestEditorFactory manifestEditorFactory; AndroidRunConfigurationFactory runConfigFactory; + SimpleRunWorkerFactory<AndroidRunConfiguration, AndroidRunSupport> runWorkerFactory; + SimpleRunWorkerFactory<AndroidRunConfiguration, AndroidDebugSupport> + debugWorkerFactory{DEBUG_RUN_MODE}; + SimpleRunWorkerFactory<AndroidRunConfiguration, AndroidQmlToolingSupport> + profilerWorkerFactory{QML_PROFILER_RUN_MODE}; + SimpleRunWorkerFactory<AndroidRunConfiguration, AndroidQmlToolingSupport> + qmlPreviewWorkerFactory{QML_PREVIEW_RUN_MODE}; AndroidBuildApkStepFactory buildApkStepFactory; AndroidGdbServerKitAspect gdbServerKitAspect; }; |