diff options
author | hjk <[email protected]> | 2019-08-07 18:05:15 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2019-08-09 12:34:42 +0000 |
commit | f9c221eb54ca3174c57f736b7afd5914147ab2a2 (patch) | |
tree | 1d58370c31fd3c342ddd133f659ee01adb017b22 /src/plugins/ios/iosplugin.cpp | |
parent | a88970db34357adaaedd7514490d94702744a7ec (diff) |
ProjectExplorer: Re-work setup runworker factories
This combines two of the previous three paths to create run workers,
and refers to RunConfigurations by id, not by type where possible
to decrease coupling between the classes.
Only allow "type of run configuration" and "type of device"
as the only possible kind of restriction and require a uniform
RunWorker constructor signature.
Adapt user code to fit that pattern.
Change-Id: I5a6d49c9a144785fd0235d7586f244b56f67b366
Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/ios/iosplugin.cpp')
-rw-r--r-- | src/plugins/ios/iosplugin.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/plugins/ios/iosplugin.cpp b/src/plugins/ios/iosplugin.cpp index da41cbb109e..50540c331f1 100644 --- a/src/plugins/ios/iosplugin.cpp +++ b/src/plugins/ios/iosplugin.cpp @@ -95,12 +95,21 @@ public: 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}; + RunWorkerFactory runWorkerFactory{ + RunWorkerFactory::make<IosRunSupport>(), + {ProjectExplorer::Constants::NORMAL_RUN_MODE}, + {runConfigurationFactory.id()} + }; + RunWorkerFactory debugWorkerFactory{ + RunWorkerFactory::make<IosDebugSupport>(), + {ProjectExplorer::Constants::DEBUG_RUN_MODE}, + {runConfigurationFactory.id()} + }; + RunWorkerFactory qmlProfilerWorkerFactory{ + RunWorkerFactory::make<IosQmlProfilerSupport>(), + {ProjectExplorer::Constants::QML_PROFILER_RUN_MODE}, + {runConfigurationFactory.id()} + }; }; IosPlugin::~IosPlugin() |