From e9f790d3533ebaee1f782e91b6e13b2c6375c86a Mon Sep 17 00:00:00 2001 From: SineStriker <55847490+SineStriker@users.noreply.github.com> Date: 周二, 11 2月 2025 23:06:01 +0800 Subject: [PATCH] AWC: fix window attribute handler --- 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