diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2012-04-10 23:04:30 +0300 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2012-04-10 23:04:30 +0300 |
commit | aa817e46ab60120084e82926caf0c1cef8dcaacf (patch) | |
tree | 4256fe9555942190da7d818b02f41f03b0eab7f7 | |
parent | 5bf254fc18c499f578f7863c7a954bae4c99fddb (diff) |
TestThreadHelper: Start the thread after entering the event loop, as the code actually intended to do.
-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(); } |