diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index b7479f8faeb..4a0f20b8d64 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 8f3047b12b9..d2481f2ac63 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 d394e1ce030..d969ca47c5f 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 9a011cd2b46..209bc06d1d3 100644 --- a/src/plugins/qmlpreview/qmlpreviewruncontrol.cpp +++ b/src/plugins/qmlpreview/qmlpreviewruncontrol.cpp @@ -239,10 +239,8 @@ LocalQmlPreviewSupportFactory::LocalQmlPreviewSupportFactory() setProduct(); 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 b405bdd40f3..af91963e023 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp @@ -259,9 +259,8 @@ public: setProduct(); 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(); } };