Debugger: Use a full class for DebuggerRunWorkerFactory

This continues the work started with de6c7696d2.

Change-Id: Ifc306347f2346909a9eba39c74449c559a7c2f76
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2023-01-05 08:50:37 +01:00
parent 2f6ac9d797
commit 15d6e1df1b
3 changed files with 19 additions and 8 deletions

View File

@@ -709,12 +709,7 @@ public:
DebuggerKitAspect debuggerKitAspect; DebuggerKitAspect debuggerKitAspect;
CommonOptionsPage commonOptionsPage; CommonOptionsPage commonOptionsPage;
RunWorkerFactory debuggerWorkerFactory{ DebuggerRunWorkerFactory debuggerWorkerFactory;
RunWorkerFactory::make<DebuggerRunTool>(),
{ProjectExplorer::Constants::DEBUG_RUN_MODE},
{}, // All local run configs?
{PE::DESKTOP_DEVICE_TYPE, "DockerDeviceType"}
};
// FIXME: Needed? // FIXME: Needed?
// QString mainScript = runConfig->property("mainScript").toString(); // QString mainScript = runConfig->property("mainScript").toString();

View File

@@ -1073,4 +1073,14 @@ void DebugServerRunner::setAttachPid(ProcessHandle pid)
m_pid = pid; m_pid = pid;
} }
} // namespace Debugger // DebuggerRunWorkerFactory
DebuggerRunWorkerFactory::DebuggerRunWorkerFactory()
{
setProduct<DebuggerRunTool>();
addSupportedRunMode(ProjectExplorer::Constants::DEBUG_RUN_MODE);
addSupportedDeviceType(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
addSupportedDeviceType("DockerDeviceType");
}
} // Debugger

View File

@@ -155,7 +155,13 @@ private:
bool m_useMulti = true; bool m_useMulti = true;
}; };
class DebuggerRunWorkerFactory final : public ProjectExplorer::RunWorkerFactory
{
public:
DebuggerRunWorkerFactory();
};
extern DEBUGGER_EXPORT const char DebugServerRunnerWorkerId[]; extern DEBUGGER_EXPORT const char DebugServerRunnerWorkerId[];
extern DEBUGGER_EXPORT const char GdbServerPortGathererWorkerId[]; extern DEBUGGER_EXPORT const char GdbServerPortGathererWorkerId[];
} // namespace Debugger } // Debugger