BareMetal: Hide GdbServerProviderRunner class definition in .cpp

Change-Id: Idf4a10b0e94fbe2603807f7d61c61e2ce791d23d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
hjk
2024-09-30 10:48:40 +02:00
parent fe757caf81
commit 955c12ec84
2 changed files with 16 additions and 24 deletions

View File

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

View File

@@ -5,7 +5,7 @@
#include <baremetal/idebugserverprovider.h>
#include <projectexplorer/runcontrol.h>
#include <utils/commandline.h>
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