Introduce a function to register all local run configs

Change-Id: I936fb4e970f04859ba19eb0ecf2dee1c1ce758d8
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Dominik Holland
2024-02-01 15:58:37 +01:00
parent 2a6de890c7
commit 8f2d0dbcc9
5 changed files with 15 additions and 11 deletions

View File

@@ -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

View File

@@ -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) {

View File

@@ -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:

View File

@@ -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

View File

@@ -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();
}
};