Jenkins not yet supporting the new QMetaObject::invokeMethod syntax, locally on Qt 5.11 it is working

This commit is contained in:
Klaus Basan
2018-07-30 00:03:19 +02:00
parent c282d4e1f8
commit 4fef6fe0b2

View File

@@ -84,17 +84,19 @@ namespace BlackMisc
{
m_result = m_task();
setFinished();
this->setFinished();
auto *ownThread = thread();
moveToThread(ownThread->thread()); // move worker back to the thread which constructed it, so there is no race on deletion
QMetaObject::invokeMethod(ownThread, &CWorker::deleteLater);
QMetaObject::invokeMethod(this, &CWorker::deleteLater);
this->moveToThread(ownThread->thread()); // move worker back to the thread which constructed it, so there is no race on deletion
//! \todo KB 2018-97 new syntax not yet supported on Jenkins QMetaObject::invokeMethod(ownThread, &CWorker::deleteLater)
QMetaObject::invokeMethod(ownThread, "deleteLater");
QMetaObject::invokeMethod(this, "deleteLater");
}
const CLogCategoryList &CWorkerBase::getLogCategories()
{
static const BlackMisc::CLogCategoryList cats { BlackMisc::CLogCategory::worker() };
static const BlackMisc::CLogCategoryList cats { CLogCategory::worker() };
return cats;
}