diff options
author | Dominik Holland <dominik.holland@qt.io> | 2024-02-01 15:58:37 +0100 |
---|---|---|
committer | Dominik Holland <dominik.holland@qt.io> | 2024-02-01 15:58:31 +0000 |
commit | 8f2d0dbcc919db995b036a4ba90dd9550f2c9f18 (patch) | |
tree | 9c1f0ae32826bc892ed3fc6c08c648f38000ac57 | |
parent | 2a6de890c74ef501511da451218fd037744d6a3e (diff) |
Introduce a function to register all local run configs
Change-Id: I936fb4e970f04859ba19eb0ecf2dee1c1ce758d8
Reviewed-by: hjk <hjk@qt.io>
-rw-r--r-- | src/plugins/debugger/debuggerruncontrol.cpp | 6 | ||||
-rw-r--r-- | src/plugins/projectexplorer/runcontrol.cpp | 8 | ||||
-rw-r--r-- | src/plugins/projectexplorer/runcontrol.h | 1 | ||||
-rw-r--r-- | src/plugins/qmlpreview/qmlpreviewruncontrol.cpp | 6 | ||||
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp | 5 |
5 files changed, 15 insertions, 11 deletions
diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index b7479f8fae..4a0f20b8d6 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -1096,10 +1096,8 @@ DebuggerRunWorkerFactory::DebuggerRunWorkerFactory() addSupportedRunMode(ProjectExplorer::Constants::DAP_GDB_DEBUG_RUN_MODE); addSupportedDeviceType(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE); addSupportedDeviceType("DockerDeviceType"); - addSupportedRunConfig(ProjectExplorer::Constants::QMAKE_RUNCONFIG_ID); - addSupportedRunConfig(ProjectExplorer::Constants::QBS_RUNCONFIG_ID); - addSupportedRunConfig(ProjectExplorer::Constants::CMAKE_RUNCONFIG_ID); - addSupportedRunConfig(ProjectExplorer::Constants::CUSTOM_EXECUTABLE_RUNCONFIG_ID); + + addSupportForLocalRunConfigs(); } } // Debugger diff --git a/src/plugins/projectexplorer/runcontrol.cpp b/src/plugins/projectexplorer/runcontrol.cpp index 8f3047b12b..d2481f2ac6 100644 --- a/src/plugins/projectexplorer/runcontrol.cpp +++ b/src/plugins/projectexplorer/runcontrol.cpp @@ -100,6 +100,14 @@ void RunWorkerFactory::addSupportedDeviceType(Id deviceType) m_supportedDeviceTypes.append(deviceType); } +void RunWorkerFactory::addSupportForLocalRunConfigs() +{ + addSupportedRunConfig(ProjectExplorer::Constants::QMAKE_RUNCONFIG_ID); + addSupportedRunConfig(ProjectExplorer::Constants::QBS_RUNCONFIG_ID); + addSupportedRunConfig(ProjectExplorer::Constants::CMAKE_RUNCONFIG_ID); + addSupportedRunConfig(ProjectExplorer::Constants::CUSTOM_EXECUTABLE_RUNCONFIG_ID); +} + void RunWorkerFactory::cloneProduct(Id exitstingStepId, Id overrideId) { for (RunWorkerFactory *factory : g_runWorkerFactories) { diff --git a/src/plugins/projectexplorer/runcontrol.h b/src/plugins/projectexplorer/runcontrol.h index d394e1ce03..d969ca47c5 100644 --- a/src/plugins/projectexplorer/runcontrol.h +++ b/src/plugins/projectexplorer/runcontrol.h @@ -113,6 +113,7 @@ protected: void addSupportedRunMode(Utils::Id runMode); void addSupportedRunConfig(Utils::Id runConfig); void addSupportedDeviceType(Utils::Id deviceType); + void addSupportForLocalRunConfigs(); void cloneProduct(Utils::Id exitstingStepId, Utils::Id overrideId = Utils::Id()); private: diff --git a/src/plugins/qmlpreview/qmlpreviewruncontrol.cpp b/src/plugins/qmlpreview/qmlpreviewruncontrol.cpp index 9a011cd2b4..209bc06d1d 100644 --- a/src/plugins/qmlpreview/qmlpreviewruncontrol.cpp +++ b/src/plugins/qmlpreview/qmlpreviewruncontrol.cpp @@ -239,10 +239,8 @@ LocalQmlPreviewSupportFactory::LocalQmlPreviewSupportFactory() setProduct<LocalQmlPreviewSupport>(); addSupportedRunMode(ProjectExplorer::Constants::QML_PREVIEW_RUN_MODE); addSupportedDeviceType(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE); - addSupportedRunConfig(ProjectExplorer::Constants::QMAKE_RUNCONFIG_ID); - addSupportedRunConfig(ProjectExplorer::Constants::QBS_RUNCONFIG_ID); - addSupportedRunConfig(ProjectExplorer::Constants::CMAKE_RUNCONFIG_ID); - addSupportedRunConfig(ProjectExplorer::Constants::CUSTOM_EXECUTABLE_RUNCONFIG_ID); + + addSupportForLocalRunConfigs(); } } // QmlPreview diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp index b405bdd40f..af91963e02 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp @@ -259,9 +259,8 @@ public: setProduct<LocalQmlProfilerSupport>(); addSupportedRunMode(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); addSupportedDeviceType(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE); - addSupportedRunConfig(ProjectExplorer::Constants::QMAKE_RUNCONFIG_ID); - addSupportedRunConfig(ProjectExplorer::Constants::QBS_RUNCONFIG_ID); - addSupportedRunConfig(ProjectExplorer::Constants::CMAKE_RUNCONFIG_ID); + + addSupportForLocalRunConfigs(); } }; |