From 4ce984953a4df4f6038953d3c4bf129c70b8d2cf Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Fri, 1 Dec 2023 19:23:00 +0100 Subject: Don't use Qt keywords in headers Unfortunately for many Wayland features applications need to access Qt private headers which will fail if the project is built with QT_NO_KEYWORDS. Ideally, the examples and tests were ported, too, and QT_NO_KEYWORDS enabled in .cmakec.conf. Pick-to: 6.7 Change-Id: I9f988d304bcc8dba4dd84761c41ba3da2473515d Reviewed-by: Volker Hilsheimer --- src/client/qwaylanddisplay_p.h | 4 ++-- src/client/qwaylandinputdevice_p.h | 4 ++-- src/client/qwaylandprimaryselectionv1_p.h | 2 +- src/client/qwaylandsurface_p.h | 4 ++-- src/client/qwaylandwindow_p.h | 6 +++--- src/compositor/compositor_api/qwaylandmousetracker_p.h | 2 +- src/compositor/extensions/qwaylandpresentationtime_p.h | 2 +- src/compositor/extensions/qwltexturesharingextension.cpp | 2 +- src/compositor/extensions/qwltexturesharingextension_p.h | 6 +++--- src/compositor/hardware_integration/qwltextureorphanage_p.h | 2 +- .../compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.h | 2 +- src/imports/texture-sharing/sharedtextureprovider.cpp | 2 +- src/imports/texture-sharing/sharedtextureprovider_p.h | 6 +++--- src/imports/texture-sharing/texturesharingextension_p.h | 4 ++-- 14 files changed, 24 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h index 74c9aede4..868811cca 100644 --- a/src/client/qwaylanddisplay_p.h +++ b/src/client/qwaylanddisplay_p.h @@ -249,11 +249,11 @@ public: void initEventThread(); -public slots: +public Q_SLOTS: void blockingReadEvents(); void flushRequests(); -signals: +Q_SIGNALS: void reconnected(); void globalAdded(const RegistryGlobal &global); void globalRemoved(const RegistryGlobal &global); diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h index 4051cf898..67bfb9afd 100644 --- a/src/client/qwaylandinputdevice_p.h +++ b/src/client/qwaylandinputdevice_p.h @@ -258,7 +258,7 @@ public: } #endif -private slots: +private Q_SLOTS: void handleFocusDestroyed(); void handleFocusLost(); @@ -314,7 +314,7 @@ protected: void pointer_axis_value120(uint32_t axis, int32_t value120) override; void pointer_axis_relative_direction(uint32_t axis, uint32_t direction) override; -private slots: +private Q_SLOTS: void handleFocusDestroyed() { invalidateFocus(); } private: diff --git a/src/client/qwaylandprimaryselectionv1_p.h b/src/client/qwaylandprimaryselectionv1_p.h index 59bb62116..3591f0623 100644 --- a/src/client/qwaylandprimaryselectionv1_p.h +++ b/src/client/qwaylandprimaryselectionv1_p.h @@ -69,7 +69,7 @@ public: QMimeData *mimeData() const { return m_mimeData; } -signals: +Q_SIGNALS: void cancelled(); protected: diff --git a/src/client/qwaylandsurface_p.h b/src/client/qwaylandsurface_p.h index 657f4ad43..41860297e 100644 --- a/src/client/qwaylandsurface_p.h +++ b/src/client/qwaylandsurface_p.h @@ -41,12 +41,12 @@ public: static QWaylandSurface *fromWlSurface(::wl_surface *surface); -signals: +Q_SIGNALS: void screensChanged(); void preferredBufferScaleChanged(); void preferredBufferTransformChanged(); -private slots: +private Q_SLOTS: void handleScreenRemoved(QScreen *qScreen); protected: diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h index 1ed4ce79f..8957f7aef 100644 --- a/src/client/qwaylandwindow_p.h +++ b/src/client/qwaylandwindow_p.h @@ -237,10 +237,10 @@ public: virtual void reinit(); void reset(); -public slots: +public Q_SLOTS: void applyConfigure(); -signals: +Q_SIGNALS: void wlSurfaceCreated(); void wlSurfaceDestroyed(); @@ -335,7 +335,7 @@ protected: Qt::ScreenOrientation mLastReportedContentOrientation = Qt::PrimaryOrientation; -private slots: +private Q_SLOTS: void doApplyConfigureFromOtherThread(); private: diff --git a/src/compositor/compositor_api/qwaylandmousetracker_p.h b/src/compositor/compositor_api/qwaylandmousetracker_p.h index 1f243e7d2..efc49c3f5 100644 --- a/src/compositor/compositor_api/qwaylandmousetracker_p.h +++ b/src/compositor/compositor_api/qwaylandmousetracker_p.h @@ -44,7 +44,7 @@ public: bool windowSystemCursorEnabled() const; bool hovered() const; -signals: +Q_SIGNALS: void mouseXChanged(); void mouseYChanged(); void windowSystemCursorEnabledChanged(); diff --git a/src/compositor/extensions/qwaylandpresentationtime_p.h b/src/compositor/extensions/qwaylandpresentationtime_p.h index 7da82cbbf..c57cd91d2 100644 --- a/src/compositor/extensions/qwaylandpresentationtime_p.h +++ b/src/compositor/extensions/qwaylandpresentationtime_p.h @@ -40,7 +40,7 @@ public: static const struct wl_interface *interface(); static QByteArray interfaceName(); -signals: +Q_SIGNALS: void presented(quint64 sequence, quint64 tv_sec, quint32 tv_nsec, quint32 refresh_nsec); }; diff --git a/src/compositor/extensions/qwltexturesharingextension.cpp b/src/compositor/extensions/qwltexturesharingextension.cpp index 2168c4147..c474176d2 100644 --- a/src/compositor/extensions/qwltexturesharingextension.cpp +++ b/src/compositor/extensions/qwltexturesharingextension.cpp @@ -99,7 +99,7 @@ public: return m_errorString; } -public slots: +public Q_SLOTS: void doResponse(const QString &key, QtWayland::ServerBuffer *buffer) { if (key != m_id) diff --git a/src/compositor/extensions/qwltexturesharingextension_p.h b/src/compositor/extensions/qwltexturesharingextension_p.h index 784f94a2a..92f9ee187 100644 --- a/src/compositor/extensions/qwltexturesharingextension_p.h +++ b/src/compositor/extensions/qwltexturesharingextension_p.h @@ -71,13 +71,13 @@ public: static QWaylandTextureSharingExtension *self() { return s_self; } -public slots: +public Q_SLOTS: void requestBuffer(const QString &key); -signals: +Q_SIGNALS: void bufferResult(const QString &key, QtWayland::ServerBuffer *buffer); -protected slots: +protected Q_SLOTS: void cleanupBuffers(); protected: diff --git a/src/compositor/hardware_integration/qwltextureorphanage_p.h b/src/compositor/hardware_integration/qwltextureorphanage_p.h index 1e5298530..f040ec750 100644 --- a/src/compositor/hardware_integration/qwltextureorphanage_p.h +++ b/src/compositor/hardware_integration/qwltextureorphanage_p.h @@ -45,7 +45,7 @@ public: // uses QOpenGLContext::currentContext to call deleteTexturesByContext on all shared ctx void deleteTextures(); -public slots: +public Q_SLOTS: // uses sender() to call deleteTexturesByContext void onContextAboutToBeDestroyed(QOpenGLContext *ctx); diff --git a/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.h b/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.h index 2153a5bdf..3ec77957f 100644 --- a/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.h +++ b/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.h @@ -64,7 +64,7 @@ public: bool isEnabled() { return m_layerIndex != -1; } QWaylandQuickHardwareLayer *hwLayer() const { return m_hwLayer; } -public slots: +public Q_SLOTS: void handleBufferCommitted(); void handleSurfaceChanged(); void updatePosition(); diff --git a/src/imports/texture-sharing/sharedtextureprovider.cpp b/src/imports/texture-sharing/sharedtextureprovider.cpp index 7be161608..ded29b44e 100644 --- a/src/imports/texture-sharing/sharedtextureprovider.cpp +++ b/src/imports/texture-sharing/sharedtextureprovider.cpp @@ -207,7 +207,7 @@ public: } -public slots: +public Q_SLOTS: void doResponse(const QString &key) { if (key != m_id) return; // not our buffer diff --git a/src/imports/texture-sharing/sharedtextureprovider_p.h b/src/imports/texture-sharing/sharedtextureprovider_p.h index 8a4fcea23..aac772619 100644 --- a/src/imports/texture-sharing/sharedtextureprovider_p.h +++ b/src/imports/texture-sharing/sharedtextureprovider_p.h @@ -40,13 +40,13 @@ public: static bool preinitialize(); -public slots: +public Q_SLOTS: void receiveBuffer(QtWaylandClient::QWaylandServerBuffer *buffer, const QString &id); -signals: +Q_SIGNALS: void replyReceived(const QString &id); -private slots: +private Q_SLOTS: void handleExtensionActive(); private: diff --git a/src/imports/texture-sharing/texturesharingextension_p.h b/src/imports/texture-sharing/texturesharingextension_p.h index a7584c097..4a00de8eb 100644 --- a/src/imports/texture-sharing/texturesharingextension_p.h +++ b/src/imports/texture-sharing/texturesharingextension_p.h @@ -35,11 +35,11 @@ class TextureSharingExtension : public QWaylandClientExtensionTemplate