From 07ea5346bc464c4d6c51abfe204d193b32b8999e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20N=C3=A4tterlund?= Date: Thu, 7 Mar 2013 13:20:24 +0100 Subject: [PATCH] QNX: Fixed error message when stopping debugging on BlackBerry devices When killing the blackberry-connect process, we get an exit code != 0, so it's treated as an error. Disconnect the signal-slot connection, to ignore any exit code we get. Change-Id: Ib08298007dd454c49087e5b62d8aef08963dd097 Reviewed-by: Rafael Roquetto Reviewed-by: Nicolas Arnaud-Cormos Reviewed-by: Mehdi Fekari --- src/plugins/qnx/blackberryconnect.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/qnx/blackberryconnect.cpp b/src/plugins/qnx/blackberryconnect.cpp index 0d4d6538c62..a782b692313 100644 --- a/src/plugins/qnx/blackberryconnect.cpp +++ b/src/plugins/qnx/blackberryconnect.cpp @@ -109,8 +109,6 @@ BlackBerryConnect::BlackBerryConnect(BlackBerryRunConfiguration *runConfig) connect(m_process, SIGNAL(readyReadStandardOutput()), this, SLOT(readStandardOutput())); connect(m_process, SIGNAL(readyReadStandardError()), this, SLOT(readStandardError())); - connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), - this, SLOT(handleProcessFinished(int,QProcess::ExitStatus))); } void BlackBerryConnect::connectToDevice() @@ -133,6 +131,9 @@ void BlackBerryConnect::connectToDevice() connectArgs << QLatin1String("-password") << m_password; connectArgs << QLatin1String("-sshPublicKey") << m_publicKeyFile; + connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), + this, SLOT(handleProcessFinished(int,QProcess::ExitStatus)), Qt::UniqueConnection); + m_process->start(m_connectCmd, connectArgs); } @@ -142,9 +143,12 @@ void BlackBerryConnect::disconnectFromDevice() return; if (m_usageCount[m_deviceHost] == 1) { + disconnect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), + this, SLOT(handleProcessFinished(int,QProcess::ExitStatus))); m_process->terminate(); if (!m_process->waitForFinished(5000)) m_process->kill(); + m_connected = false; } }