summaryrefslogtreecommitdiff
path: root/src/plugins/android/androidrunner.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@digia.com>2014-03-13 16:21:36 +0100
committerUlf Hermann <ulf.hermann@digia.com>2014-03-13 16:35:05 +0100
commitf5dc6bed4513a9f7bf51923ac10ad6a385af83cb (patch)
tree06138afb3db24d2bf361bd377d658f7f25c27d83 /src/plugins/android/androidrunner.cpp
parent911f6b515934483027c8cb7d6f6bc67a6aad7984 (diff)
downloadqt-creator-f5dc6bed4513a9f7bf51923ac10ad6a385af83cb.tar.gz
Android: Don't read from adb logcat while PID isn't known
Otherwise we throw away important parts of the output. Change-Id: I7ab6989c19660bcbb53d6ff61eda62878044ded2 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Diffstat (limited to 'src/plugins/android/androidrunner.cpp')
-rw-r--r--src/plugins/android/androidrunner.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/android/androidrunner.cpp b/src/plugins/android/androidrunner.cpp
index 7647876824..d92cc7eb04 100644
--- a/src/plugins/android/androidrunner.cpp
+++ b/src/plugins/android/androidrunner.cpp
@@ -183,6 +183,7 @@ void AndroidRunner::checkPID()
emit remoteProcessStarted(-1, -1);
}
m_wasStarted = true;
+ logcatReadStandardOutput();
}
}
@@ -357,6 +358,8 @@ void AndroidRunner::logcatReadStandardError()
void AndroidRunner::logcatReadStandardOutput()
{
+ if (m_processPID == -1)
+ return;
QList<QByteArray> lines = m_adbLogcatProcess.readAllStandardOutput().split('\n');
// lines always contains at least one item
lines[0].prepend(m_logcat);