diff options
author | hjk <hjk@qt.io> | 2017-04-27 09:53:07 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2017-04-28 12:42:29 +0000 |
commit | 6e990f96c66b40fcf73db65a857f20f8a1dc4389 (patch) | |
tree | 382228cfbc965e427c7128aaf8638022cb33e88d /src/plugins/remotelinux | |
parent | 6e2756244d95288179c019ecd0800cafcaf0113d (diff) | |
download | qt-creator-6e990f96c66b40fcf73db65a857f20f8a1dc4389.tar.gz |
Debugger: Remove DebuggerRunControl
Use plain RunControl + DebuggerRunTool combo instead.
Change-Id: Ib71b5eab50da667b9d71dcc6689d2643ad8ecdee
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/remotelinux')
5 files changed, 17 insertions, 17 deletions
diff --git a/src/plugins/remotelinux/abstractremotelinuxrunsupport.cpp b/src/plugins/remotelinux/abstractremotelinuxrunsupport.cpp index af8e3d3222..dd410d505a 100644 --- a/src/plugins/remotelinux/abstractremotelinuxrunsupport.cpp +++ b/src/plugins/remotelinux/abstractremotelinuxrunsupport.cpp @@ -41,6 +41,7 @@ namespace Internal { class AbstractRemoteLinuxRunSupportPrivate { public: + ApplicationLauncher launcher; AbstractRemoteLinuxRunSupport::State state = AbstractRemoteLinuxRunSupport::Inactive; DeviceUsedPortsGatherer portsGatherer; ApplicationLauncher fifoCreator; @@ -53,7 +54,7 @@ public: using namespace Internal; AbstractRemoteLinuxRunSupport::AbstractRemoteLinuxRunSupport(RunControl *runControl) - : SimpleTargetRunner(runControl), + : TargetRunner(runControl), d(new AbstractRemoteLinuxRunSupportPrivate) { } @@ -64,6 +65,11 @@ AbstractRemoteLinuxRunSupport::~AbstractRemoteLinuxRunSupport() delete d; } +ApplicationLauncher *AbstractRemoteLinuxRunSupport::applicationLauncher() +{ + return &d->launcher; +} + void AbstractRemoteLinuxRunSupport::setState(AbstractRemoteLinuxRunSupport::State state) { d->state = state; diff --git a/src/plugins/remotelinux/abstractremotelinuxrunsupport.h b/src/plugins/remotelinux/abstractremotelinuxrunsupport.h index fee49fae72..9502972dfa 100644 --- a/src/plugins/remotelinux/abstractremotelinuxrunsupport.h +++ b/src/plugins/remotelinux/abstractremotelinuxrunsupport.h @@ -36,7 +36,7 @@ namespace RemoteLinux { namespace Internal { class AbstractRemoteLinuxRunSupportPrivate; } -class REMOTELINUX_EXPORT AbstractRemoteLinuxRunSupport : public ProjectExplorer::SimpleTargetRunner +class REMOTELINUX_EXPORT AbstractRemoteLinuxRunSupport : public ProjectExplorer::TargetRunner { Q_OBJECT @@ -52,6 +52,8 @@ public: explicit AbstractRemoteLinuxRunSupport(ProjectExplorer::RunControl *runControl); ~AbstractRemoteLinuxRunSupport(); + ProjectExplorer::ApplicationLauncher *applicationLauncher(); + void setState(State state); State state() const; diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp index 5293634918..c0f925c9d9 100644 --- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp +++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp @@ -107,12 +107,6 @@ bool LinuxDeviceDebugSupport::isQmlDebugging() const return d->qmlDebugging; } -void LinuxDeviceDebugSupport::showMessage(const QString &msg, int channel) -{ - if (state() != AbstractRemoteLinuxRunSupport::Inactive) - runControl()->toolRunner()->showMessage(msg, channel); -} - AbstractRemoteLinuxRunSupport *LinuxDeviceDebugSupport::targetRunner() const { return qobject_cast<AbstractRemoteLinuxRunSupport *>(runControl()->targetRunner()); @@ -200,7 +194,7 @@ void LinuxDeviceDebugSupport::handleAppRunnerError(const QString &error) { if (state() == AbstractRemoteLinuxRunSupport::Running) { showMessage(error, AppError); - runControl()->toolRunner()->notifyInferiorIll(); + notifyInferiorIll(); } else if (state() != AbstractRemoteLinuxRunSupport::Inactive) { handleAdapterSetupFailed(error); } @@ -214,15 +208,15 @@ void LinuxDeviceDebugSupport::handleAppRunnerFinished(bool success) if (state() == AbstractRemoteLinuxRunSupport::Running) { // The QML engine does not realize on its own that the application has finished. if (d->qmlDebugging && !d->cppDebugging) - runControl()->toolRunner()->quitDebugger(); + quitDebugger(); else if (!success) - runControl()->toolRunner()->notifyInferiorIll(); + notifyInferiorIll(); } else if (state() == AbstractRemoteLinuxRunSupport::StartingRunner) { RemoteSetupResult result; result.success = false; result.reason = tr("Debugging failed."); - runControl()->toolRunner()->notifyEngineRemoteSetupFinished(result); + notifyEngineRemoteSetupFinished(result); } targetRunner()->reset(); } @@ -265,7 +259,7 @@ void LinuxDeviceDebugSupport::handleAdapterSetupFailed(const QString &error) RemoteSetupResult result; result.success = false; result.reason = tr("Initial setup failed: %1").arg(error); - runControl()->toolRunner()->notifyEngineRemoteSetupFinished(result); + notifyEngineRemoteSetupFinished(result); } void LinuxDeviceDebugSupport::handleAdapterSetupDone() @@ -276,7 +270,7 @@ void LinuxDeviceDebugSupport::handleAdapterSetupDone() result.success = true; result.gdbServerPort = d->gdbServerPort; result.qmlServerPort = d->qmlPort; - runControl()->toolRunner()->notifyEngineRemoteSetupFinished(result); + notifyEngineRemoteSetupFinished(result); } void LinuxDeviceDebugSupport::handleRemoteProcessStarted() diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.h b/src/plugins/remotelinux/remotelinuxdebugsupport.h index 59cccabb0b..cf63906032 100644 --- a/src/plugins/remotelinux/remotelinuxdebugsupport.h +++ b/src/plugins/remotelinux/remotelinuxdebugsupport.h @@ -63,8 +63,6 @@ private: void handleAdapterSetupDone(); void handleDebuggingFinished(); - void showMessage(const QString &msg, int channel); - AbstractRemoteLinuxRunSupport *targetRunner() const; AbstractRemoteLinuxRunSupport::State state() const; diff --git a/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp b/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp index b2cfd6cff2..af07e1828f 100644 --- a/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp +++ b/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp @@ -137,7 +137,7 @@ RunControl *RemoteLinuxRunControlFactory::create(RunConfiguration *runConfig, Co params.symbolFile = symbolFile; } - auto runControl = new DebuggerRunControl(runConfig, mode); + auto runControl = new RunControl(runConfig, mode); (void) new AbstractRemoteLinuxRunSupport(runControl); (void) new LinuxDeviceDebugSupport(runControl, params, errorMessage); return runControl; |