diff options
author | hjk <[email protected]> | 2019-03-20 13:58:59 +0100 |
---|---|---|
committer | hjk <[email protected]> | 2019-04-03 06:59:03 +0000 |
commit | 0c6f234d4317c361bd0908f478707a4cf000eeb4 (patch) | |
tree | 01961aa196d11009a705decffb37b4d2530126b0 /src/plugins/ios/iosplugin.cpp | |
parent | ed87b74a599592f059b0e4fe1ed8c14c81891c9a (diff) |
iOS: Use SimpleRunWorkerFactory instead of manual registration
Same result, less code, more fashionable.
Change-Id: I43b0fcc6e5efb5e394b1652c3c9b34871cbe2fee
Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/ios/iosplugin.cpp')
-rw-r--r-- | src/plugins/ios/iosplugin.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/plugins/ios/iosplugin.cpp b/src/plugins/ios/iosplugin.cpp index b2f3e482acf..080f9dcde70 100644 --- a/src/plugins/ios/iosplugin.cpp +++ b/src/plugins/ios/iosplugin.cpp @@ -94,6 +94,13 @@ public: IosDeployStepFactory deployStepFactory; IosDsymBuildStepFactory dsymBuildStepFactory; IosDeployConfigurationFactory deployConfigurationFactory; + + SimpleRunWorkerFactory<Internal::IosRunSupport, IosRunConfiguration> + runWorkerFactory{ProjectExplorer::Constants::NORMAL_RUN_MODE}; + SimpleRunWorkerFactory<Internal::IosDebugSupport, IosRunConfiguration> + debugWorkerFactory{ProjectExplorer::Constants::DEBUG_RUN_MODE}; + SimpleRunWorkerFactory<Internal::IosQmlProfilerSupport, IosRunConfiguration> + qmlProfilerWorkerFactory{ProjectExplorer::Constants::QML_PROFILER_RUN_MODE}; }; IosPlugin::~IosPlugin() @@ -112,17 +119,6 @@ bool IosPlugin::initialize(const QStringList &arguments, QString *errorMessage) d = new IosPluginPrivate; - auto constraint = [](RunConfiguration *runConfig) { - return qobject_cast<IosRunConfiguration *>(runConfig) != nullptr; - }; - - RunControl::registerWorker<Internal::IosRunSupport> - (ProjectExplorer::Constants::NORMAL_RUN_MODE, constraint); - RunControl::registerWorker<Internal::IosDebugSupport> - (ProjectExplorer::Constants::DEBUG_RUN_MODE, constraint); - RunControl::registerWorker<Internal::IosQmlProfilerSupport> - (ProjectExplorer::Constants::QML_PROFILER_RUN_MODE, constraint); - return true; } |