From f5dc6bed4513a9f7bf51923ac10ad6a385af83cb Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 13 Mar 2014 16:21:36 +0100 Subject: 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 --- src/plugins/android/androidrunner.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins/android/androidrunner.cpp') 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 lines = m_adbLogcatProcess.readAllStandardOutput().split('\n'); // lines always contains at least one item lines[0].prepend(m_logcat); -- cgit v1.2.1