From ea5aa79dca1fc77ee6d8dc8c26e5362e72503ef8 Mon Sep 17 00:00:00 2001
From: Daniel Teske <daniel.teske@digia.com>
Date: Wed, 26 Jun 2013 18:18:25 +0200
Subject: [PATCH] AndroidPackageCreationStep: Ensure right thread for
 handleOutput()

The ::run method is run in a separate thread, yet the owner of the
buildstep is the gui thread. As such we need to use a DirectConnection
to ensure that the slot is called in the right thread.

Task-number: QTCREATORBUG-9660
Change-Id: Ia206f3256a23f70f50d31c739359ff24b952fe46
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
---
 src/plugins/android/androidpackagecreationstep.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/plugins/android/androidpackagecreationstep.cpp b/src/plugins/android/androidpackagecreationstep.cpp
index 5f80db9cd80..c187dc2c007 100644
--- a/src/plugins/android/androidpackagecreationstep.cpp
+++ b/src/plugins/android/androidpackagecreationstep.cpp
@@ -706,9 +706,9 @@ bool AndroidPackageCreationStep::createPackage()
     buildProc->setProcessEnvironment(m_environment.toProcessEnvironment());
 
     connect(buildProc, SIGNAL(readyReadStandardOutput()), this,
-        SLOT(handleBuildStdOutOutput()));
+        SLOT(handleBuildStdOutOutput()), Qt::DirectConnection);
     connect(buildProc, SIGNAL(readyReadStandardError()), this,
-        SLOT(handleBuildStdErrOutput()));
+        SLOT(handleBuildStdErrOutput()), Qt::DirectConnection);
 
     buildProc->setWorkingDirectory(m_androidDir.toString());
 
-- 
GitLab