Ref T486 Using QMetaObject::invokeMethod with pointer-to-member-function (or functor).

This commit is contained in:
Mat Sutcliffe
2018-12-25 14:27:20 +00:00
parent f48a411f43
commit bd9948bbff
7 changed files with 15 additions and 13 deletions

View File

@@ -73,7 +73,7 @@ namespace BlackMisc
worker->setObjectName(name);
worker->moveToThread(thread);
const bool s = QMetaObject::invokeMethod(worker, "ps_runTask");
const bool s = QMetaObject::invokeMethod(worker, &CWorker::ps_runTask);
Q_ASSERT_X(s, Q_FUNC_INFO, "cannot invoke");
Q_UNUSED(s);
thread->start();