From 57738988f2dda03544ff60cac10372b933285db1 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Tue, 18 Dec 2012 14:25:07 +0200 Subject: [PATCH] Remove useless warning dialog. Redirect the errors to the application output window. Change-Id: I927fae72a53314d0200ffbd13c68900d15259cf9 Reviewed-by: Daniel Teske --- src/plugins/android/androiddebugsupport.cpp | 5 ++--- src/plugins/android/androidruncontrol.cpp | 2 +- src/plugins/android/androidrunner.cpp | 16 +++++++--------- src/plugins/android/androidrunner.h | 2 +- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/plugins/android/androiddebugsupport.cpp b/src/plugins/android/androiddebugsupport.cpp index e2f3c7ef926..cb2288f806a 100644 --- a/src/plugins/android/androiddebugsupport.cpp +++ b/src/plugins/android/androiddebugsupport.cpp @@ -156,9 +156,8 @@ void AndroidDebugSupport::handleRemoteProcessStarted(int gdbServerPort, int qmlP void AndroidDebugSupport::handleRemoteProcessFinished(const QString &errorMsg) { - disconnect(m_runner, SIGNAL(remoteProcessFinished(QString)), - this,SLOT(handleRemoteProcessFinished(QString))); - m_runControl->engine()->notifyEngineRemoteSetupFailed(errorMsg); + if (m_runControl) + m_runControl->showMessage(errorMsg, AppStuff); } void AndroidDebugSupport::handleRemoteOutput(const QByteArray &output) diff --git a/src/plugins/android/androidruncontrol.cpp b/src/plugins/android/androidruncontrol.cpp index 45dfdf391f3..5ad51c5fc24 100644 --- a/src/plugins/android/androidruncontrol.cpp +++ b/src/plugins/android/androidruncontrol.cpp @@ -71,7 +71,7 @@ void AndroidRunControl::start() RunControl::StopResult AndroidRunControl::stop() { - m_runner->stop(true); + m_runner->stop(); return StoppedSynchronously; } diff --git a/src/plugins/android/androidrunner.cpp b/src/plugins/android/androidrunner.cpp index ac977d052e4..e106f0d99bf 100644 --- a/src/plugins/android/androidrunner.cpp +++ b/src/plugins/android/androidrunner.cpp @@ -69,7 +69,7 @@ AndroidRunner::AndroidRunner(QObject *parent, AndroidRunConfiguration *runConfig AndroidRunner::~AndroidRunner() { - stop(false); + stop(); } void AndroidRunner::checkPID() @@ -251,24 +251,22 @@ void AndroidRunner::startLogcat() emit remoteProcessStarted(5039); } -void AndroidRunner::stop(bool async) +void AndroidRunner::stop() { QMutexLocker locker(&m_mutex); m_adbLogcatProcess.kill(); - m_adbLogcatProcess.waitForFinished(-1); m_checkPIDTimer.stop(); - if (m_processPID == -1) + if (m_processPID == -1) { + m_adbLogcatProcess.kill(); return; // don't emit another signal - if (async) - QtConcurrent::run(this, &AndroidRunner::asyncStop); - else - asyncStop(); + } } void AndroidRunner::asyncStop() { killPID(); - emit remoteProcessFinished(tr("\n\n'%1' killed.").arg(m_packageName)); + m_adbLogcatProcess.kill(); + m_adbLogcatProcess.waitForFinished(-1); } void AndroidRunner::logcatReadStandardError() diff --git a/src/plugins/android/androidrunner.h b/src/plugins/android/androidrunner.h index c66525f16af..a3ec69e3880 100644 --- a/src/plugins/android/androidrunner.h +++ b/src/plugins/android/androidrunner.h @@ -55,7 +55,7 @@ public: public slots: void start(); - void stop(bool async); + void stop(); void asyncStop(); signals: