diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-11-24 13:37:06 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-11-24 13:39:13 +0100 |
commit | 34aba4724f196e34ed02cf50073f41968f119bb6 (patch) | |
tree | 0ebdfcabda989ab76ee6de53c6461553c7a767a5 /src/testlib/qtesteventloop.h | |
parent | b86b2a742afae118bf974c82ba966ddb0cae4afb (diff) | |
parent | b1cf07f495e10c93e53651ac03e46ebdaea0a97e (diff) |
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
src/corelib/io/qiodevice.cpp
src/plugins/bearer/linux_common/qofonoservice_linux.cpp
src/plugins/bearer/linux_common/qofonoservice_linux_p.h
src/plugins/platforms/android/qandroidplatformtheme.cpp
src/tools/bootstrap/bootstrap.pro
src/widgets/styles/qmacstyle_mac.mm
Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
Diffstat (limited to 'src/testlib/qtesteventloop.h')
-rw-r--r-- | src/testlib/qtesteventloop.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testlib/qtesteventloop.h b/src/testlib/qtesteventloop.h index 9e738d2c47..034655cc50 100644 --- a/src/testlib/qtesteventloop.h +++ b/src/testlib/qtesteventloop.h @@ -40,6 +40,7 @@ #include <QtCore/qeventloop.h> #include <QtCore/qobject.h> #include <QtCore/qpointer.h> +#include <QtCore/qthread.h> QT_BEGIN_NAMESPACE @@ -101,6 +102,12 @@ inline void QTestEventLoop::enterLoopMSecs(int ms) inline void QTestEventLoop::exitLoop() { + if (thread() != QThread::currentThread()) + { + QMetaObject::invokeMethod(this, "exitLoop", Qt::QueuedConnection); + return; + } + if (timerId != -1) killTimer(timerId); timerId = -1; |