From 4fef6fe0b26e01ac4a401a81a55475e7da6625cc Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Mon, 30 Jul 2018 00:03:19 +0200 Subject: [PATCH] Jenkins not yet supporting the new QMetaObject::invokeMethod syntax, locally on Qt 5.11 it is working --- src/blackmisc/worker.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/blackmisc/worker.cpp b/src/blackmisc/worker.cpp index 109b4be5f..9356c45e8 100644 --- a/src/blackmisc/worker.cpp +++ b/src/blackmisc/worker.cpp @@ -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; }