22 explicit Worker (
int *val, QThread *main)
30 qDebug () << QThread::currentThread ();
31 QVERIFY (QThread::currentThread () !=
Main_);
36 void Quit (QEventLoop& loop)
38 QTimer::singleShot (0, &loop, &QEventLoop::quit);
42 void WorkerThreadTest::testWorkerThread ()
47 QTimer::singleShot (100, &loop, &QEventLoop::quit);
51 qDebug () << Q_FUNC_INFO << QThread::currentThread ();
54 WorkerThread<Worker> worker { &val, QThread::currentThread () };
55 worker.SetAutoQuit (
true);
56 worker.SetQuitWait (1000);
59 worker.SetPaused (
true);
67 worker.SetPaused (
false);
Worker(int *val, QThread *main)
void Quit(QEventLoop &loop)