From f895d97b035ab6545c3e6bd8655a5ecbdbc360b5 Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Wed, 29 Apr 2015 12:41:55 +0200 Subject: [PATCH] Android: Increase timeout for checkPasswd and checkKeystore The timeout was "only" 4s, but apparently pretty much every android tool randomly takes longer than 4s. Increasing this timeout won't affect anyone for whom the android tool returns in 1s, but makes it work for anyone where the checking takes longer. This waiting though is done in the main thread, which is pretty bad. Moving it to a background thread isn't easy though. Change-Id: I135b1d1ee9634005d5eb6038a46d66b6a8e97fca Task-number: QTCREATORBUG-13175 Reviewed-by: BogDan Vatra --- src/plugins/android/androidmanager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp index 21ed73ed3eb..532f34f9181 100644 --- a/src/plugins/android/androidmanager.cpp +++ b/src/plugins/android/androidmanager.cpp @@ -561,9 +561,9 @@ bool AndroidManager::checkKeystorePassword(const QString &keystorePath, const QS << keystorePasswd; QProcess proc; proc.start(AndroidConfigurations::currentConfig().keytoolPath().toString(), arguments); - if (!proc.waitForStarted(4000)) + if (!proc.waitForStarted(10000)) return false; - if (!proc.waitForFinished(4000)) { + if (!proc.waitForFinished(10000)) { proc.kill(); proc.waitForFinished(); return false; @@ -590,9 +590,9 @@ bool AndroidManager::checkCertificatePassword(const QString &keystorePath, const QProcess proc; proc.start(AndroidConfigurations::currentConfig().keytoolPath().toString(), arguments); - if (!proc.waitForStarted(4000)) + if (!proc.waitForStarted(10000)) return false; - if (!proc.waitForFinished(4000)) { + if (!proc.waitForFinished(10000)) { proc.kill(); proc.waitForFinished(); return false;