summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-09-06 10:43:54 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-09-09 09:42:22 +0200
commit64ddd6a4f57f4579bfd0eab91dc0f433c3a9f5f2 (patch)
tree2e656a4776baecfed59bf585138b9b5753d80d2e
parent89af8871c653197d91541858013d08b8e7cbf751 (diff)
Adjust usage of nativeEventFilter for Qt6wip/cmake
Change-Id: Ifea48894e96f1e3f1df53650b3b07cce18a30aea Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/plugins/qnx/camera/bbcameraorientationhandler.cpp6
-rw-r--r--src/plugins/qnx/camera/bbcameraorientationhandler.h4
-rw-r--r--src/plugins/qnx/common/windowgrabber.cpp6
-rw-r--r--src/plugins/qnx/common/windowgrabber.h4
-rw-r--r--src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.cpp8
-rw-r--r--src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.h8
6 files changed, 28 insertions, 8 deletions
diff --git a/src/plugins/qnx/camera/bbcameraorientationhandler.cpp b/src/plugins/qnx/camera/bbcameraorientationhandler.cpp
index eee0f258..a4c7b43b 100644
--- a/src/plugins/qnx/camera/bbcameraorientationhandler.cpp
+++ b/src/plugins/qnx/camera/bbcameraorientationhandler.cpp
@@ -76,7 +76,11 @@ BbCameraOrientationHandler::~BbCameraOrientationHandler()
QCoreApplication::eventDispatcher()->removeNativeEventFilter(this);
}
-bool BbCameraOrientationHandler::nativeEventFilter(const QByteArray&, void *message, long*)
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+bool BbCameraOrientationHandler::nativeEventFilter(const QByteArray&, void *message, qintptr *)
+#else
+bool BbCameraOrientationHandler::nativeEventFilter(const QByteArray&, void *message, long *)
+#endif
{
bps_event_t* const event = static_cast<bps_event_t*>(message);
if (!event || bps_event_get_domain(event) != orientation_get_domain())
diff --git a/src/plugins/qnx/camera/bbcameraorientationhandler.h b/src/plugins/qnx/camera/bbcameraorientationhandler.h
index 006a259c..a98582d8 100644
--- a/src/plugins/qnx/camera/bbcameraorientationhandler.h
+++ b/src/plugins/qnx/camera/bbcameraorientationhandler.h
@@ -51,7 +51,11 @@ public:
explicit BbCameraOrientationHandler(QObject *parent = 0);
~BbCameraOrientationHandler();
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override;
+#else
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override;
+#endif
int orientation() const;
diff --git a/src/plugins/qnx/common/windowgrabber.cpp b/src/plugins/qnx/common/windowgrabber.cpp
index 9a65ad3a..f431f98a 100644
--- a/src/plugins/qnx/common/windowgrabber.cpp
+++ b/src/plugins/qnx/common/windowgrabber.cpp
@@ -189,7 +189,11 @@ bool WindowGrabber::handleScreenEvent(screen_event_t screen_event)
return false;
}
-bool WindowGrabber::nativeEventFilter(const QByteArray &eventType, void *message, long*)
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+bool WindowGrabber::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *)
+#else
+bool WindowGrabber::nativeEventFilter(const QByteArray &eventType, void *message, long *)
+#endif
{
if (eventType == "screen_event_t") {
const screen_event_t event = static_cast<screen_event_t>(message);
diff --git a/src/plugins/qnx/common/windowgrabber.h b/src/plugins/qnx/common/windowgrabber.h
index 3ebd0e8a..5603d963 100644
--- a/src/plugins/qnx/common/windowgrabber.h
+++ b/src/plugins/qnx/common/windowgrabber.h
@@ -100,7 +100,11 @@ public:
void pause();
void resume();
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override;
+#else
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override;
+#endif
bool handleScreenEvent(screen_event_t event);
diff --git a/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.cpp b/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.cpp
index c050c03c..29fd082d 100644
--- a/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.cpp
+++ b/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.cpp
@@ -113,9 +113,11 @@ void MmrEventMediaPlayerControl::resetMonitoring()
m_speed = 0;
}
-bool MmrEventMediaPlayerControl::nativeEventFilter(const QByteArray &eventType,
- void *message,
- long *result)
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+bool MmrEventMediaPlayerControl::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result)
+#else
+bool MmrEventMediaPlayerControl::nativeEventFilter(const QByteArray &eventType, void *message, long *result)
+#endif
{
Q_UNUSED(result)
if (eventType == "screen_event_t") {
diff --git a/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.h b/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.h
index 0e4defc5..cb80ccbf 100644
--- a/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.h
+++ b/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.h
@@ -58,9 +58,11 @@ public:
void stopMonitoring() override;
void resetMonitoring() override;
- bool nativeEventFilter(const QByteArray &eventType,
- void *message,
- long *result) override;
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override;
+#else
+ bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override;
+#endif
private Q_SLOTS:
void readEvents();