Fix signature method in qt6

This commit is contained in:
Laurent Montel 2022-03-08 07:26:17 +01:00
parent 5bb8be96ee
commit 854aab798d
4 changed files with 16 additions and 0 deletions

View file

@ -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") {

View file

@ -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

View file

@ -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<xcb_generic_event_t *>(message);

View file

@ -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();