summaryrefslogtreecommitdiff
path: root/src/plugins/remotelinux
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2017-03-09 14:13:13 +0100
committerhjk <hjk@qt.io>2017-03-10 15:14:12 +0000
commit7826ec7ed5c44cf6bc5c80f10c8588dff8372c5d (patch)
tree926a70a8e3228e480b6b5494cd3526c05d263b1e /src/plugins/remotelinux
parent5090c2929a7ccf20ebe379bb572fd5bcbb10f8e1 (diff)
downloadqt-creator-7826ec7ed5c44cf6bc5c80f10c8588dff8372c5d.tar.gz
ProjectExplorer: Merge ApplicationLauncher and DeviceApplicationRunner
Treat ApplicationLauncher as a special case of a DeviceApplicationRunner with an implicit desktop device. As a first step, lump the two implementations together. Change-Id: Ifa3ea3f38d320023050378555e2d256e762b6683 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/remotelinux')
-rw-r--r--src/plugins/remotelinux/abstractremotelinuxrunsupport.cpp19
-rw-r--r--src/plugins/remotelinux/abstractremotelinuxrunsupport.h4
-rw-r--r--src/plugins/remotelinux/remotelinuxanalyzesupport.cpp17
-rw-r--r--src/plugins/remotelinux/remotelinuxdebugsupport.cpp17
-rw-r--r--src/plugins/remotelinux/remotelinuxruncontrol.cpp22
5 files changed, 38 insertions, 41 deletions
diff --git a/src/plugins/remotelinux/abstractremotelinuxrunsupport.cpp b/src/plugins/remotelinux/abstractremotelinuxrunsupport.cpp
index 4528042ed0..88c3300235 100644
--- a/src/plugins/remotelinux/abstractremotelinuxrunsupport.cpp
+++ b/src/plugins/remotelinux/abstractremotelinuxrunsupport.cpp
@@ -25,7 +25,6 @@
#include "abstractremotelinuxrunsupport.h"
-#include <projectexplorer/devicesupport/deviceapplicationrunner.h>
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/runnables.h>
@@ -51,9 +50,9 @@ public:
AbstractRemoteLinuxRunSupport::State state;
StandardRunnable runnable;
- DeviceApplicationRunner appRunner;
+ ApplicationLauncher appLauncher;
DeviceUsedPortsGatherer portsGatherer;
- DeviceApplicationRunner fifoCreator;
+ ApplicationLauncher fifoCreator;
const IDevice::ConstPtr device;
Utils::PortList portList;
QString fifo;
@@ -115,7 +114,7 @@ void AbstractRemoteLinuxRunSupport::setFinished()
if (d->state == Inactive)
return;
if (d->state == Running)
- d->appRunner.stop();
+ d->appLauncher.stop();
d->state = Inactive;
}
@@ -154,7 +153,7 @@ void AbstractRemoteLinuxRunSupport::createRemoteFifo()
QSharedPointer<QByteArray> output(new QByteArray);
QSharedPointer<QByteArray> errors(new QByteArray);
- connect(&d->fifoCreator, &DeviceApplicationRunner::finished,
+ connect(&d->fifoCreator, &ApplicationLauncher::finished,
this, [this, output, errors](bool success) {
if (!success) {
handleResourcesError(QString("Failed to create fifo: %1").arg(QLatin1String(*errors)));
@@ -164,12 +163,12 @@ void AbstractRemoteLinuxRunSupport::createRemoteFifo()
}
});
- connect(&d->fifoCreator, &DeviceApplicationRunner::remoteStdout,
+ connect(&d->fifoCreator, &ApplicationLauncher::remoteStdout,
this, [output](const QByteArray &data) {
output->append(data);
});
- connect(&d->fifoCreator, &DeviceApplicationRunner::remoteStderr,
+ connect(&d->fifoCreator, &ApplicationLauncher::remoteStderr,
this, [errors](const QByteArray &data) {
errors->append(data);
});
@@ -190,13 +189,13 @@ const StandardRunnable &AbstractRemoteLinuxRunSupport::runnable() const
void AbstractRemoteLinuxRunSupport::reset()
{
d->portsGatherer.disconnect(this);
- d->appRunner.disconnect(this);
+ d->appLauncher.disconnect(this);
d->state = Inactive;
}
-DeviceApplicationRunner *AbstractRemoteLinuxRunSupport::appRunner() const
+ApplicationLauncher *AbstractRemoteLinuxRunSupport::appRunner() const
{
- return &d->appRunner;
+ return &d->appLauncher;
}
} // namespace RemoteLinux
diff --git a/src/plugins/remotelinux/abstractremotelinuxrunsupport.h b/src/plugins/remotelinux/abstractremotelinuxrunsupport.h
index f4b8416573..cfbeaca898 100644
--- a/src/plugins/remotelinux/abstractremotelinuxrunsupport.h
+++ b/src/plugins/remotelinux/abstractremotelinuxrunsupport.h
@@ -33,7 +33,7 @@
#include <QObject>
namespace ProjectExplorer {
-class DeviceApplicationRunner;
+class ApplicationLauncher;
class RunConfiguration;
class StandardRunnable;
}
@@ -61,7 +61,7 @@ public:
protected:
void setState(State state);
State state() const;
- ProjectExplorer::DeviceApplicationRunner *appRunner() const;
+ ProjectExplorer::ApplicationLauncher *appRunner() const;
virtual void startExecution() = 0;
diff --git a/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp b/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp
index 7bf1c851cd..9286d0d17c 100644
--- a/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp
+++ b/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp
@@ -33,7 +33,6 @@
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
-#include <projectexplorer/devicesupport/deviceapplicationrunner.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/runnables.h>
@@ -77,7 +76,7 @@ public:
QString remoteFifo;
QString perfRecordArguments;
- DeviceApplicationRunner outputGatherer;
+ ApplicationLauncher outputGatherer;
QmlDebug::QmlOutputParser outputParser;
};
@@ -145,18 +144,18 @@ void RemoteLinuxAnalyzeSupport::startExecution()
setState(StartingRunner);
- DeviceApplicationRunner *runner = appRunner();
- connect(runner, &DeviceApplicationRunner::remoteStderr,
+ ApplicationLauncher *runner = appRunner();
+ connect(runner, &ApplicationLauncher::remoteStderr,
this, &RemoteLinuxAnalyzeSupport::handleRemoteErrorOutput);
- connect(runner, &DeviceApplicationRunner::remoteStdout,
+ connect(runner, &ApplicationLauncher::remoteStdout,
this, &RemoteLinuxAnalyzeSupport::handleRemoteOutput);
- connect(runner, &DeviceApplicationRunner::remoteProcessStarted,
+ connect(runner, &ApplicationLauncher::remoteProcessStarted,
this, &RemoteLinuxAnalyzeSupport::handleRemoteProcessStarted);
- connect(runner, &DeviceApplicationRunner::finished,
+ connect(runner, &ApplicationLauncher::finished,
this, &RemoteLinuxAnalyzeSupport::handleAppRunnerFinished);
- connect(runner, &DeviceApplicationRunner::reportProgress,
+ connect(runner, &ApplicationLauncher::reportProgress,
this, &RemoteLinuxAnalyzeSupport::handleProgressReport);
- connect(runner, &DeviceApplicationRunner::reportError,
+ connect(runner, &ApplicationLauncher::reportError,
this, &RemoteLinuxAnalyzeSupport::handleAppRunnerError);
auto r = runnable();
diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
index d94dd27ec7..d4cf2e95f2 100644
--- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
+++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
@@ -33,7 +33,6 @@
#include <debugger/debuggerkitinformation.h>
#include <projectexplorer/buildconfiguration.h>
-#include <projectexplorer/devicesupport/deviceapplicationrunner.h>
#include <projectexplorer/project.h>
#include <projectexplorer/runnables.h>
#include <projectexplorer/target.h>
@@ -128,19 +127,19 @@ void LinuxDeviceDebugSupport::startExecution()
setState(StartingRunner);
d->gdbserverOutput.clear();
- DeviceApplicationRunner *runner = appRunner();
- connect(runner, &DeviceApplicationRunner::remoteStderr,
+ ApplicationLauncher *launcher = appRunner();
+ connect(launcher, &ApplicationLauncher::remoteStderr,
this, &LinuxDeviceDebugSupport::handleRemoteErrorOutput);
- connect(runner, &DeviceApplicationRunner::remoteStdout,
+ connect(launcher, &ApplicationLauncher::remoteStdout,
this, &LinuxDeviceDebugSupport::handleRemoteOutput);
- connect(runner, &DeviceApplicationRunner::finished,
+ connect(launcher, &ApplicationLauncher::finished,
this, &LinuxDeviceDebugSupport::handleAppRunnerFinished);
- connect(runner, &DeviceApplicationRunner::reportProgress,
+ connect(launcher, &ApplicationLauncher::reportProgress,
this, &LinuxDeviceDebugSupport::handleProgressReport);
- connect(runner, &DeviceApplicationRunner::reportError,
+ connect(launcher, &ApplicationLauncher::reportError,
this, &LinuxDeviceDebugSupport::handleAppRunnerError);
if (d->qmlDebugging && !d->cppDebugging)
- connect(runner, &DeviceApplicationRunner::remoteProcessStarted,
+ connect(launcher, &ApplicationLauncher::remoteProcessStarted,
this, &LinuxDeviceDebugSupport::handleRemoteProcessStarted);
StandardRunnable r = runnable();
@@ -162,7 +161,7 @@ void LinuxDeviceDebugSupport::startExecution()
}
r.executable = command;
r.commandLineArguments = QtcProcess::joinArgs(args, OsTypeLinux);
- runner->start(r, device());
+ launcher->start(r, device());
}
void LinuxDeviceDebugSupport::handleAppRunnerError(const QString &error)
diff --git a/src/plugins/remotelinux/remotelinuxruncontrol.cpp b/src/plugins/remotelinux/remotelinuxruncontrol.cpp
index fd66b49da1..4fca73096f 100644
--- a/src/plugins/remotelinux/remotelinuxruncontrol.cpp
+++ b/src/plugins/remotelinux/remotelinuxruncontrol.cpp
@@ -25,7 +25,7 @@
#include "remotelinuxruncontrol.h"
-#include <projectexplorer/devicesupport/deviceapplicationrunner.h>
+#include <projectexplorer/applicationlauncher.h>
#include <utils/utilsicons.h>
@@ -36,7 +36,7 @@ namespace RemoteLinux {
class RemoteLinuxRunControl::RemoteLinuxRunControlPrivate
{
public:
- DeviceApplicationRunner runner;
+ ApplicationLauncher launcher;
};
RemoteLinuxRunControl::RemoteLinuxRunControl(RunConfiguration *rc)
@@ -54,23 +54,23 @@ RemoteLinuxRunControl::~RemoteLinuxRunControl()
void RemoteLinuxRunControl::start()
{
reportApplicationStart();
- d->runner.disconnect(this);
- connect(&d->runner, &DeviceApplicationRunner::reportError,
+ d->launcher.disconnect(this);
+ connect(&d->launcher, &ApplicationLauncher::reportError,
this, &RemoteLinuxRunControl::handleErrorMessage);
- connect(&d->runner, &DeviceApplicationRunner::remoteStderr,
+ connect(&d->launcher, &ApplicationLauncher::remoteStderr,
this, &RemoteLinuxRunControl::handleRemoteErrorOutput);
- connect(&d->runner, &DeviceApplicationRunner::remoteStdout,
+ connect(&d->launcher, &ApplicationLauncher::remoteStdout,
this, &RemoteLinuxRunControl::handleRemoteOutput);
- connect(&d->runner, &DeviceApplicationRunner::finished,
+ connect(&d->launcher, &ApplicationLauncher::finished,
this, &RemoteLinuxRunControl::handleRunnerFinished);
- connect(&d->runner, &DeviceApplicationRunner::reportProgress,
+ connect(&d->launcher, &ApplicationLauncher::reportProgress,
this, &RemoteLinuxRunControl::handleProgressReport);
- d->runner.start(runnable(), device());
+ d->launcher.start(runnable(), device());
}
RunControl::StopResult RemoteLinuxRunControl::stop()
{
- d->runner.stop();
+ d->launcher.stop();
return AsynchronousStop;
}
@@ -101,7 +101,7 @@ void RemoteLinuxRunControl::handleProgressReport(const QString &progressString)
void RemoteLinuxRunControl::setFinished()
{
- d->runner.disconnect(this);
+ d->launcher.disconnect(this);
reportApplicationStop();
}