From 955c12ec84c6ce59332fc801edc4a5bc1a9ba0ea Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 30 Sep 2024 10:48:40 +0200 Subject: [PATCH] BareMetal: Hide GdbServerProviderRunner class definition in .cpp Change-Id: Idf4a10b0e94fbe2603807f7d61c61e2ce791d23d Reviewed-by: Cristian Adam --- .../debugservers/gdb/gdbserverprovider.cpp | 29 ++++++++++--------- .../debugservers/gdb/gdbserverprovider.h | 11 +------ 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.cpp b/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.cpp index 223e6a2fd82..cf2bbe915ca 100644 --- a/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.cpp +++ b/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.cpp @@ -33,6 +33,21 @@ const char initCommandsKeyC[] = "InitCommands"; const char resetCommandsKeyC[] = "ResetCommands"; const char useExtendedRemoteKeyC[] = "UseExtendedRemote"; +class GdbServerProviderRunner final : public SimpleTargetRunner +{ +public: + GdbServerProviderRunner(RunControl *runControl, const CommandLine &commandLine) + : SimpleTargetRunner(runControl) + { + setId("BareMetalGdbServer"); + // Baremetal's GDB servers are launched on the host, not on the target. + setStartModifier([this, commandLine] { + setCommandLine(commandLine); + forceRunOnHost(); + }); + } +}; + // GdbServerProvider GdbServerProvider::GdbServerProvider(const QString &id) @@ -300,18 +315,4 @@ QString GdbServerProviderConfigWidget::defaultResetCommandsTooltip() "The MCU should be halted after these commands."); } -// GdbServerProviderRunner - -GdbServerProviderRunner::GdbServerProviderRunner(ProjectExplorer::RunControl *runControl, - const CommandLine &commandLine) - : SimpleTargetRunner(runControl) -{ - setId("BareMetalGdbServer"); - // Baremetal's GDB servers are launched on the host, not on the target. - setStartModifier([this, commandLine] { - setCommandLine(commandLine); - forceRunOnHost(); - }); -} - } // BareMetal::Internal diff --git a/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.h b/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.h index f9b0887693c..f5f755bd6c6 100644 --- a/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.h +++ b/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.h @@ -5,7 +5,7 @@ #include -#include +#include QT_BEGIN_NAMESPACE class QComboBox; @@ -91,13 +91,4 @@ protected: Utils::PathChooser *m_peripheralDescriptionFileChooser = nullptr; }; -// GdbServerProviderRunner - -class GdbServerProviderRunner final : public ProjectExplorer::SimpleTargetRunner -{ -public: - explicit GdbServerProviderRunner(ProjectExplorer::RunControl *runControl, - const Utils::CommandLine &commandLine); -}; - } // BareMetal::Internal