Uniform ApplicationLauncher API: get rid of remoteStderr/out()

Use existing appendMessage() for this purpose either with
StdErrFormat for remoteStderr() or with StdOutFormat for remoteStdout().
In case when device process is used in ApplicationLauncher
no appendMessage() was emitted so far with StdErrFormat or StdOutFormat.

Change-Id: I2f6603aaf28113fea2a8bb6bd1738320cc39be75
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2021-11-09 16:00:18 +01:00
parent 9739ded573
commit d14e68eac2
8 changed files with 27 additions and 73 deletions

View File

@@ -1257,16 +1257,6 @@ void SimpleTargetRunner::doStart(const Runnable &runnable, const IDevice::ConstP
reportFailure(msg);
});
connect(&m_launcher, &ApplicationLauncher::remoteStderr,
this, [this](const QString &output) {
appendMessage(output, Utils::StdErrFormat, false);
});
connect(&m_launcher, &ApplicationLauncher::remoteStdout,
this, [this](const QString &output) {
appendMessage(output, Utils::StdOutFormat, false);
});
connect(&m_launcher, &ApplicationLauncher::finished,
this, [this] {
m_launcher.disconnect(this);
@@ -1290,10 +1280,7 @@ void SimpleTargetRunner::doStart(const Runnable &runnable, const IDevice::ConstP
reportStarted();
});
connect(&m_launcher, &ApplicationLauncher::appendMessage,
this, [this](const QString &progressString, Utils::OutputFormat format) {
appendMessage(progressString, format);
});
connect(&m_launcher, &ApplicationLauncher::appendMessage, this, &RunWorker::appendMessage);
m_launcher.start(runnable, device);
}