forked from qt-creator/qt-creator
Use SynchronousProcess::runBlocking
Use SynchronousProcess::runBlocking in favor of SychronousProcess::run. This avoid nested event loops which can produce really strange crashes if not use carefully. This patch only converts those processes that have a timeout of less than 5 seconds or use the default timeout. Change-Id: I9de8899dcc946af7049ea357a91972996c0256a1 Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -173,7 +173,7 @@ AndroidRunner::AndroidRunner(QObject *parent,
|
||||
Utils::SynchronousProcess psProc;
|
||||
psProc.setTimeoutS(5);
|
||||
Utils::SynchronousProcessResponse response
|
||||
= psProc.run(m_adb, selector() << _("shell") << _("readlink") << _("$(which ps)"));
|
||||
= psProc.runBlocking(m_adb, selector() << _("shell") << _("readlink") << _("$(which ps)"));
|
||||
const QString which = response.allOutput();
|
||||
m_isBusyBox = which.startsWith("busybox");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user