Commit 659b0b47 authored by Ulf Hermann's avatar Ulf Hermann

Android: Add context objects for QObject::connect with functors

If several threads can be involved in the signal/slot exchange we need
to show the receiver objects to connect() so that the signals can be
queued when necessary.

Change-Id: I24b4fe90095ce10eeeff9618faff97bd9d05c6eb
Reviewed-by: default avatarBogDan Vatra <bogdan@kdab.com>
parent bce5aca6
......@@ -72,35 +72,35 @@ AndroidAnalyzeSupport::AndroidAnalyzeSupport(AndroidRunConfiguration *runConfig,
auto runner = new AndroidRunner(this, runConfig, runControl->runMode());
connect(runControl, &AnalyzerRunControl::finished,
connect(runControl, &AnalyzerRunControl::finished, runner,
[runner]() { runner->stop(); });
connect(runControl, &AnalyzerRunControl::starting,
connect(runControl, &AnalyzerRunControl::starting, runner,
[runner]() { runner->start(); });
connect(&m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort,
connect(&m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort, this,
[this, runControl](Utils::Port) {
runControl->notifyRemoteSetupDone(m_qmlPort);
});
connect(runner, &AndroidRunner::remoteProcessStarted,
connect(runner, &AndroidRunner::remoteProcessStarted, this,
[this](Utils::Port, Utils::Port qmlPort) {
m_qmlPort = qmlPort;
});
connect(runner, &AndroidRunner::remoteProcessFinished,
connect(runner, &AndroidRunner::remoteProcessFinished, this,
[this, runControl](const QString &errorMsg) {
runControl->notifyRemoteFinished();
runControl->appendMessage(errorMsg, Utils::NormalMessageFormat);
});
connect(runner, &AndroidRunner::remoteErrorOutput,
connect(runner, &AndroidRunner::remoteErrorOutput, this,
[this, runControl](const QString &msg) {
runControl->appendMessage(msg, Utils::StdErrFormatSameLine);
m_outputParser.processOutput(msg);
});
connect(runner, &AndroidRunner::remoteOutput,
connect(runner, &AndroidRunner::remoteOutput, this,
[this, runControl](const QString &msg) {
runControl->appendMessage(msg, Utils::StdOutFormatSameLine);
m_outputParser.processOutput(msg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment