forked from qt-creator/qt-creator
Debugger: Setup debugger factory in a new style
Change-Id: I946cf03f70b8d6ee727883ea9480529faf8b7cb7 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -699,8 +699,6 @@ public:
|
||||
Perspective m_perspective{Constants::PRESET_PERSPECTIVE_ID, Tr::tr("Debugger")};
|
||||
Perspective m_perspectiveDap{Constants::DAP_PERSPECTIVE_ID, Tr::tr("DAP")};
|
||||
|
||||
DebuggerRunWorkerFactory debuggerWorkerFactory;
|
||||
|
||||
std::optional<QPoint> attachToUnstartedApplicationDialogLastPosition;
|
||||
|
||||
// FIXME: Needed?
|
||||
@@ -777,6 +775,8 @@ QWidget *DebuggerPluginPrivate::createEngineManagerWindow(BaseTreeView *engineMa
|
||||
|
||||
DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
|
||||
{
|
||||
setupDebuggerRunWorker();
|
||||
|
||||
qRegisterMetaType<ContextData>("ContextData");
|
||||
qRegisterMetaType<DebuggerRunParameters>("DebuggerRunParameters");
|
||||
qRegisterMetaType<QString *>();
|
||||
|
@@ -689,20 +689,27 @@ void DebuggerRunTool::startDebugServerIfNeededAndContinueStartup()
|
||||
d->debuggerServerProc.start();
|
||||
}
|
||||
|
||||
// DebuggerRunWorkerFactory
|
||||
|
||||
DebuggerRunWorkerFactory::DebuggerRunWorkerFactory()
|
||||
class DebuggerRunWorkerFactory final : public ProjectExplorer::RunWorkerFactory
|
||||
{
|
||||
setProduct<DebuggerRunTool>();
|
||||
setId(Constants::DEBUGGER_RUN_FACTORY);
|
||||
addSupportedRunMode(ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
||||
addSupportedRunMode(ProjectExplorer::Constants::DAP_CMAKE_DEBUG_RUN_MODE);
|
||||
addSupportedRunMode(ProjectExplorer::Constants::DAP_GDB_DEBUG_RUN_MODE);
|
||||
addSupportedRunMode(ProjectExplorer::Constants::DAP_LLDB_DEBUG_RUN_MODE);
|
||||
addSupportedDeviceType(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
|
||||
addSupportedDeviceType("DockerDeviceType");
|
||||
public:
|
||||
DebuggerRunWorkerFactory()
|
||||
{
|
||||
setProduct<DebuggerRunTool>();
|
||||
setId(Constants::DEBUGGER_RUN_FACTORY);
|
||||
addSupportedRunMode(ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
||||
addSupportedRunMode(ProjectExplorer::Constants::DAP_CMAKE_DEBUG_RUN_MODE);
|
||||
addSupportedRunMode(ProjectExplorer::Constants::DAP_GDB_DEBUG_RUN_MODE);
|
||||
addSupportedRunMode(ProjectExplorer::Constants::DAP_LLDB_DEBUG_RUN_MODE);
|
||||
addSupportedDeviceType(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
|
||||
addSupportedDeviceType("DockerDeviceType");
|
||||
|
||||
addSupportForLocalRunConfigs();
|
||||
addSupportForLocalRunConfigs();
|
||||
}
|
||||
};
|
||||
|
||||
void setupDebuggerRunWorker()
|
||||
{
|
||||
static DebuggerRunWorkerFactory theDebuggerRunWorkerFactory;
|
||||
}
|
||||
|
||||
} // Debugger
|
||||
|
@@ -50,11 +50,7 @@ private:
|
||||
DebuggerRunParameters m_runParameters;
|
||||
};
|
||||
|
||||
class DebuggerRunWorkerFactory final : public ProjectExplorer::RunWorkerFactory
|
||||
{
|
||||
public:
|
||||
DebuggerRunWorkerFactory();
|
||||
};
|
||||
void setupDebuggerRunWorker();
|
||||
|
||||
class SimpleDebugRunnerFactory final : public ProjectExplorer::RunWorkerFactory
|
||||
{
|
||||
|
Reference in New Issue
Block a user