diff options
author | hjk <hjk@qt.io> | 2018-05-11 16:59:36 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2018-05-29 09:03:29 +0000 |
commit | 65be72d64dedfddbcb458740d76d72a3e6fa8ab9 (patch) | |
tree | 137c79518f9d4543ef199fd7c522a450685f9618 /src/plugins/android/androidplugin.cpp | |
parent | 3f83cf2447e701cc7b3ffd5cd7397ae287052f68 (diff) |
ProjectExplorer: Add RunConfigFactory::addRunWorkerFactory convienience
There is a recurring special case that certain run controls depend
on the presence of specific RunConfiguration (which in turn has
it's own restriction on e.g. target or project types) but have no
further restrictions.
Make it easy to handle that case.
Change-Id: I2e86f366591b02003f720dcc00b4c52bb2f34e00
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/android/androidplugin.cpp')
-rw-r--r-- | src/plugins/android/androidplugin.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/plugins/android/androidplugin.cpp b/src/plugins/android/androidplugin.cpp index 3e5ace89e8..cc54d74586 100644 --- a/src/plugins/android/androidplugin.cpp +++ b/src/plugins/android/androidplugin.cpp @@ -70,6 +70,10 @@ 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); } }; @@ -100,13 +104,6 @@ bool AndroidPlugin::initialize(const QStringList &arguments, QString *errorMessa Q_UNUSED(arguments); Q_UNUSED(errorMessage); - RunControl::registerWorker<AndroidRunConfiguration, AndroidRunSupport>(NORMAL_RUN_MODE); - RunControl::registerWorker<AndroidRunConfiguration, AndroidDebugSupport>(DEBUG_RUN_MODE); - RunControl::registerWorker<AndroidRunConfiguration, AndroidQmlToolingSupport>( - QML_PROFILER_RUN_MODE); - RunControl::registerWorker<AndroidRunConfiguration, AndroidQmlToolingSupport>( - QML_PREVIEW_RUN_MODE); - RunControl::registerWorker(QML_PREVIEW_RUN_MODE, [](RunControl *runControl) -> RunWorker* { const Runnable runnable = runControl->runConfiguration()->runnable(); return new AndroidQmlToolingSupport(runControl, runnable.executable, runnable.commandLineArguments); |