Check QMessageLogContext class version.

--HG--
branch : release
This commit is contained in:
Roman Telezhynskyi 2018-09-30 18:39:51 +03:00
parent c23502da9a
commit 2295a56160

View File

@ -13,6 +13,7 @@
#include <QObject> #include <QObject>
#include <functional> #include <functional>
#include <cassert>
#include "logging.h" #include "logging.h"
@ -73,6 +74,9 @@ public:
m_function(context.function), m_function(context.function),
m_category(context.category) m_category(context.category)
{ {
#ifndef V_NO_ASSERT
assert(context.version == 2);
#endif
moveToThread(thread); moveToThread(thread);
connect(QThread::currentThread(), &QThread::finished, this, &WorkerClass::deleteLater); connect(QThread::currentThread(), &QThread::finished, this, &WorkerClass::deleteLater);
} }