From 659b0b47883da1dbd5496185853bbbc0f0bdc1d0 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 27 Jul 2016 15:51:20 +0200 Subject: [PATCH] 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: BogDan Vatra --- src/plugins/android/androidanalyzesupport.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/android/androidanalyzesupport.cpp b/src/plugins/android/androidanalyzesupport.cpp index e64b839969c..0c859c8f198 100644 --- a/src/plugins/android/androidanalyzesupport.cpp +++ b/src/plugins/android/androidanalyzesupport.cpp @@ -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);