diff --git a/src/main.cpp b/src/main.cpp index c49c72c4b3..5cb7af1c00 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -575,7 +575,11 @@ void Application::updateX11Time(xcb_generic_event_t *event) setX11Time(time); } +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) bool XcbEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, long int *result) +#else +bool XcbEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) +#endif { Q_UNUSED(result) if (eventType == "xcb_generic_event_t") { diff --git a/src/main.h b/src/main.h index ea2844f966..8d5f234a81 100644 --- a/src/main.h +++ b/src/main.h @@ -32,7 +32,11 @@ class X11EventFilter; class XcbEventFilter : public QAbstractNativeEventFilter { public: +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) bool nativeEventFilter(const QByteArray &eventType, void *message, long int *result) override; +#else + bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override; +#endif }; class X11EventFilterContainer : public QObject diff --git a/src/xwl/databridge.cpp b/src/xwl/databridge.cpp index d156ac4546..9355ae1104 100644 --- a/src/xwl/databridge.cpp +++ b/src/xwl/databridge.cpp @@ -57,7 +57,11 @@ void DataBridge::init() kwinApp()->installNativeEventFilter(this); } +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) bool DataBridge::nativeEventFilter(const QByteArray &eventType, void *message, long int *) +#else +bool DataBridge::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *) +#endif { if (eventType == "xcb_generic_event_t") { xcb_generic_event_t *event = static_cast(message); diff --git a/src/xwl/databridge.h b/src/xwl/databridge.h index 541384eb61..5c94463947 100644 --- a/src/xwl/databridge.h +++ b/src/xwl/databridge.h @@ -54,7 +54,11 @@ public: return m_dnd; } +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) bool nativeEventFilter(const QByteArray &eventType, void *message, long int *result) override; +#else + bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override; +#endif private: void init();