aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/android/androidrunner.cpp
diff options
context:
space:
mode:
authorDaniel Teske <[email protected]>2013-11-21 15:54:03 +0100
committerDaniel Teske <[email protected]>2013-11-22 12:03:55 +0100
commit54636d9756966fab7365043d8fd255993675e935 (patch)
tree1b062f3d5ac630434c245455c29e3f35c4b4a796 /src/plugins/android/androidrunner.cpp
parent559e66cb353c510c2d624d60a6d28a37fa66dcb0 (diff)
Android: Remove various waitForFinished(-1)
That waits forever. For processes that should finish in a reasonable time, we should not wait forever. I changed most of the waits to 5s, all of those functions do handle a failed waitForFinished. I doubt that all callers do also handle it correctly, but that's probably still better than waiting forever. Task-number: QTCREATORBUG-10868 Change-Id: I368a911f19a4f81d71b24cf9d58796bd99878040 Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
Diffstat (limited to 'src/plugins/android/androidrunner.cpp')
-rw-r--r--src/plugins/android/androidrunner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/android/androidrunner.cpp b/src/plugins/android/androidrunner.cpp
index 881d61cc822..a3895c0cc56 100644
--- a/src/plugins/android/androidrunner.cpp
+++ b/src/plugins/android/androidrunner.cpp
@@ -217,7 +217,7 @@ void AndroidRunner::asyncStart()
emit remoteProcessFinished(tr("Failed to forward C++ debugging ports. Reason: %1.").arg(adb.errorString()));
return;
}
- if (!adb.waitForFinished(-1)) {
+ if (!adb.waitForFinished(5000)) {
emit remoteProcessFinished(tr("Failed to forward C++ debugging ports."));
return;
}
@@ -260,7 +260,7 @@ void AndroidRunner::asyncStart()
emit remoteProcessFinished(tr("Failed to start the activity. Reason: %1.").arg(adb.errorString()));
return;
}
- if (!adb.waitForFinished(-1)) {
+ if (!adb.waitForFinished(5000)) {
adb.terminate();
emit remoteProcessFinished(tr("Unable to start '%1'.").arg(m_packageName));
return;