From 7610c3a509b8a04d25e72a6282d9c8ea8ecbd27f Mon Sep 17 00:00:00 2001 From: iveswang <1660583890@qq.com> Date: ćšć, 13 6æ 2024 14:09:06 +0800 Subject: [PATCH] fix: QObjectPrivate::threadData type change when qt >=5.15 --- src/core/qwkglobal.cpp | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/core/qwkglobal.cpp b/src/core/qwkglobal.cpp index aa34606..ee33221 100644 --- a/src/core/qwkglobal.cpp +++ b/src/core/qwkglobal.cpp @@ -27,10 +27,14 @@ if (!obj) continue; +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) if (QObjectPrivate::get(obj)->threadData.loadRelaxed() != d->threadData.loadRelaxed()) { - qWarning( - "QCoreApplication: Object event filter cannot be in a different thread."); +#else + if (QObjectPrivate::get(obj)->threadData != d->threadData) { +#endif + qWarning("QCoreApplication: Object event filter cannot be in a different " + "thread."); continue; } if (obj->eventFilter(receiver, event)) @@ -39,5 +43,4 @@ } return false; } - } -- Gitblit v1.9.1