diff options
-rw-r--r-- | tests/lib/test-thread-helper.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/lib/test-thread-helper.cpp b/tests/lib/test-thread-helper.cpp index d2148d2a..a977c7a5 100644 --- a/tests/lib/test-thread-helper.cpp +++ b/tests/lib/test-thread-helper.cpp @@ -1,5 +1,6 @@ #include "tests/lib/test-thread-helper.h" #include <QEventLoop> +#include <QTimer> TestThreadHelperBase::TestThreadHelperBase(ThreadObjectBase *threadObject) { @@ -11,7 +12,7 @@ TestThreadHelperBase::TestThreadHelperBase(ThreadObjectBase *threadObject) QEventLoop loop; QObject::connect(mThread, SIGNAL(started()), &loop, SLOT(quit())); - QMetaObject::invokeMethod(mThread, "start"); + QTimer::singleShot(0, mThread, SLOT(start())); loop.exec(); } |