From 97e8bd6f4a79b5813f00937803060ef0a50f00a4 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Thu, 15 Dec 2016 17:43:00 +0100 Subject: [PATCH 1/7] Fix initial window property values being propagated This was broken since the the shell-surface refactoring. Change-Id: I130b7396e85c570a9d11d609af6b3016e3f706f0 Reviewed-by: Dominik Holland Reviewed-by: Paul Olav Tvete --- src/plugins/platforms/wayland/qwaylandwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index d16746bac2c..ca99f3de18f 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -176,6 +176,9 @@ void QWaylandWindow::initWindow() mShellSurface->setAppId(appId); } } + // the user may have already set some window properties, so make sure to send them out + for (auto it = m_properties.cbegin(); it != m_properties.cend(); ++it) + mShellSurface->sendProperty(it.key(), it.value()); } // Enable high-dpi rendering. Scale() returns the screen scale factor and will From 81f80fa19fa143ea1bb6deb2b7309ed723e75904 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Thu, 15 Dec 2016 14:58:32 +0100 Subject: [PATCH 2/7] Set PLUGIN_CLASS_NAME in .pro files This fixes static linking and cmake config file generation. In some cases, the class was renamed for disambiguation or just uniformity. Task-number: QTBUG-51248 Change-Id: Ibdce2e1b6a52312f84301c426632e94deeb567bd Reviewed-by: Oswald Buddenhagen Reviewed-by: Samuli Piippo --- .../platforms/wayland/plugins/decorations/bradient/bradient.pro | 1 + .../wayland/plugins/hardwareintegration/brcm-egl/brcm-egl.pro | 1 + .../hardwareintegration/drm-egl-server/drm-egl-server.pro | 1 + .../libhybris-egl-server/libhybris-egl-server.pro | 1 + .../plugins/hardwareintegration/wayland-egl/wayland-egl.pro | 1 + .../hardwareintegration/xcomposite-egl/xcomposite-egl.pro | 1 + .../hardwareintegration/xcomposite-glx/xcomposite-glx.pro | 1 + 7 files changed, 7 insertions(+) diff --git a/src/plugins/platforms/wayland/plugins/decorations/bradient/bradient.pro b/src/plugins/platforms/wayland/plugins/decorations/bradient/bradient.pro index 843149e0836..e31576783b6 100644 --- a/src/plugins/platforms/wayland/plugins/decorations/bradient/bradient.pro +++ b/src/plugins/platforms/wayland/plugins/decorations/bradient/bradient.pro @@ -8,4 +8,5 @@ SOURCES += main.cpp QMAKE_USE += wayland-client PLUGIN_TYPE = wayland-decoration-client +PLUGIN_CLASS_NAME = QWaylandBradientDecorationPlugin load(qt_plugin) diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/brcm-egl.pro b/src/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/brcm-egl.pro index 550343cfe99..c2e9ad4ffb9 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/brcm-egl.pro +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/brcm-egl.pro @@ -8,4 +8,5 @@ OTHER_FILES += \ SOURCES += main.cpp PLUGIN_TYPE = wayland-graphics-integration-client +PLUGIN_CLASS_NAME = QWaylandBrcmEglClientBufferPlugin load(qt_plugin) diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/drm-egl-server.pro b/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/drm-egl-server.pro index 29a48c9e6e7..2fba5bd1fdf 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/drm-egl-server.pro +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/drm-egl-server.pro @@ -11,4 +11,5 @@ OTHER_FILES += \ SOURCES += main.cpp PLUGIN_TYPE = wayland-graphics-integration-client +PLUGIN_CLASS_NAME = DrmEglServerBufferPlugin load(qt_plugin) diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/libhybris-egl-server/libhybris-egl-server.pro b/src/plugins/platforms/wayland/plugins/hardwareintegration/libhybris-egl-server/libhybris-egl-server.pro index d7bf03705ce..3193b8f6877 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/libhybris-egl-server/libhybris-egl-server.pro +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/libhybris-egl-server/libhybris-egl-server.pro @@ -8,4 +8,5 @@ OTHER_FILES += \ SOURCES += main.cpp PLUGIN_TYPE = wayland-graphics-integration-client +PLUGIN_CLASS_NAME = LibHybrisEglServerBufferPlugin load(qt_plugin) diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/wayland-egl.pro b/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/wayland-egl.pro index 076b6af2c34..d85c5efaaa1 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/wayland-egl.pro +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/wayland-egl.pro @@ -8,4 +8,5 @@ OTHER_FILES += \ SOURCES += main.cpp PLUGIN_TYPE = wayland-graphics-integration-client +PLUGIN_CLASS_NAME = QWaylandEglClientBufferPlugin load(qt_plugin) diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/xcomposite-egl.pro b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/xcomposite-egl.pro index 031d2812ad9..c8734084b0c 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/xcomposite-egl.pro +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/xcomposite-egl.pro @@ -11,4 +11,5 @@ SOURCES += \ main.cpp PLUGIN_TYPE = wayland-graphics-integration-client +PLUGIN_CLASS_NAME = QWaylandXCompositeEglClientBufferIntegrationPlugin load(qt_plugin) diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/xcomposite-glx.pro b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/xcomposite-glx.pro index eb8e03c7f33..fb5ad15f84a 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/xcomposite-glx.pro +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/xcomposite-glx.pro @@ -8,4 +8,5 @@ SOURCES += \ main.cpp PLUGIN_TYPE = wayland-graphics-integration-client +PLUGIN_CLASS_NAME = QWaylandXCompositeGlxClientBufferIntegrationPlugin load(qt_plugin) From a37ac71c33275b007dcb80531f900e3d930930f3 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Thu, 22 Dec 2016 14:30:57 +0100 Subject: [PATCH 3/7] Client: Don't crash when the receiver of a paste closes the pipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ignore the SIGPIPE signal Task-number: QTBUG-57202 Change-Id: If22381f446675836aeb741a8e6da5473b0a27301 Reviewed-by: Martin Gräßlin Reviewed-by: Paul Olav Tvete --- src/plugins/platforms/wayland/qwaylanddatasource.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/plugins/platforms/wayland/qwaylanddatasource.cpp b/src/plugins/platforms/wayland/qwaylanddatasource.cpp index 036bd0d8651..c61de181ba6 100644 --- a/src/plugins/platforms/wayland/qwaylanddatasource.cpp +++ b/src/plugins/platforms/wayland/qwaylanddatasource.cpp @@ -48,6 +48,7 @@ #include #include +#include #if QT_CONFIG(draganddrop) @@ -85,7 +86,16 @@ void QWaylandDataSource::data_source_send(const QString &mime_type, int32_t fd) { QByteArray content = QWaylandMimeHelper::getByteArray(m_mime_data, mime_type); if (!content.isEmpty()) { + // Create a sigpipe handler that does nothing, or clients may be forced to terminate + // if the pipe is closed in the other end. + struct sigaction action, oldAction; + action.sa_handler = SIG_IGN; + sigemptyset (&action.sa_mask); + action.sa_flags = 0; + + sigaction(SIGPIPE, &action, &oldAction); write(fd, content.constData(), content.size()); + sigaction(SIGPIPE, &oldAction, nullptr); } close(fd); } From 12cc56487806ae306413f20688f5a12f9f325f2c Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Fri, 13 Jan 2017 16:58:31 +0900 Subject: [PATCH 4/7] Fix build without feature.clipboard Change-Id: I195efecca9350cb519865f251cdee9c6e23d3592 Reviewed-by: Lars Knoll --- src/plugins/platforms/wayland/client.pro | 7 +++++-- src/plugins/platforms/wayland/qwaylanddatadevice.cpp | 6 ++++++ src/plugins/platforms/wayland/qwaylanddisplay.cpp | 2 ++ src/plugins/platforms/wayland/qwaylandintegration.cpp | 10 ++++++++-- src/plugins/platforms/wayland/qwaylandintegration_p.h | 8 ++++++-- 5 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/plugins/platforms/wayland/client.pro b/src/plugins/platforms/wayland/client.pro index 7482cfd6bbd..f1338cc9911 100644 --- a/src/plugins/platforms/wayland/client.pro +++ b/src/plugins/platforms/wayland/client.pro @@ -40,7 +40,6 @@ SOURCES += qwaylandintegration.cpp \ qwaylandwindow.cpp \ qwaylandscreen.cpp \ qwaylandshmwindow.cpp \ - qwaylandclipboard.cpp \ qwaylanddnd.cpp \ qwaylanddataoffer.cpp \ qwaylanddatadevicemanager.cpp \ @@ -78,7 +77,6 @@ HEADERS += qwaylandintegration_p.h \ qwaylandinputdevice_p.h \ qwaylandbuffer_p.h \ qwaylandshmwindow_p.h \ - qwaylandclipboard_p.h \ qwaylanddnd_p.h \ qwaylanddataoffer_p.h \ qwaylanddatadevicemanager_p.h \ @@ -108,6 +106,11 @@ HEADERS += qwaylandintegration_p.h \ ../shared/qwaylandxkb_p.h \ ../shared/qwaylandsharedmemoryformathelper_p.h +qtConfig(clipboard) { + HEADERS += qwaylandclipboard_p.h + SOURCES += qwaylandclipboard.cpp +} + include(hardwareintegration/hardwareintegration.pri) include(shellintegration/shellintegration.pri) include(inputdeviceintegration/inputdeviceintegration.pri) diff --git a/src/plugins/platforms/wayland/qwaylanddatadevice.cpp b/src/plugins/platforms/wayland/qwaylanddatadevice.cpp index b76647ea2d0..ebd3ce1bff1 100644 --- a/src/plugins/platforms/wayland/qwaylanddatadevice.cpp +++ b/src/plugins/platforms/wayland/qwaylanddatadevice.cpp @@ -52,7 +52,9 @@ #include #include +#if QT_CONFIG(clipboard) #include +#endif #include #include @@ -235,13 +237,17 @@ void QWaylandDataDevice::data_device_selection(wl_data_offer *id) else m_selectionOffer.reset(); +#if QT_CONFIG(clipboard) QGuiApplicationPrivate::platformIntegration()->clipboard()->emitChanged(QClipboard::Clipboard); +#endif } void QWaylandDataDevice::selectionSourceCancelled() { m_selectionSource.reset(); +#if QT_CONFIG(clipboard) QGuiApplicationPrivate::platformIntegration()->clipboard()->emitChanged(QClipboard::Clipboard); +#endif } void QWaylandDataDevice::dragSourceCancelled() diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index 534373b1606..851d715b77f 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -44,7 +44,9 @@ #include "qwaylandscreen_p.h" #include "qwaylandcursor_p.h" #include "qwaylandinputdevice_p.h" +#if QT_CONFIG(clipboard) #include "qwaylandclipboard_p.h" +#endif #include "qwaylanddatadevicemanager_p.h" #include "qwaylandhardwareintegration_p.h" #include "qwaylandxdgshell_p.h" diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index 78d4284bd9a..78a1182c64a 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp @@ -45,7 +45,9 @@ #include "qwaylandinputcontext_p.h" #include "qwaylandshmbackingstore_p.h" #include "qwaylandnativeinterface_p.h" +#if QT_CONFIG(clipboard) #include "qwaylandclipboard_p.h" +#endif #include "qwaylanddnd_p.h" #include "qwaylandwindowmanagerintegration_p.h" #include "qwaylandscreen_p.h" @@ -131,8 +133,10 @@ QWaylandIntegration::QWaylandIntegration() { initializeInputDeviceIntegration(); mDisplay.reset(new QWaylandDisplay(this)); -#if QT_CONFIG(draganddrop) +#if QT_CONFIG(clipboard) mClipboard.reset(new QWaylandClipboard(mDisplay.data())); +#endif +#if QT_CONFIG(draganddrop) mDrag.reset(new QWaylandDrag(mDisplay.data())); #endif QString icStr = QPlatformInputContextFactory::requested(); @@ -228,12 +232,14 @@ QPlatformFontDatabase *QWaylandIntegration::fontDatabase() const return mFontDb.data(); } -#if QT_CONFIG(draganddrop) +#if QT_CONFIG(clipboard) QPlatformClipboard *QWaylandIntegration::clipboard() const { return mClipboard.data(); } +#endif +#if QT_CONFIG(draganddrop) QPlatformDrag *QWaylandIntegration::drag() const { return mDrag.data(); diff --git a/src/plugins/platforms/wayland/qwaylandintegration_p.h b/src/plugins/platforms/wayland/qwaylandintegration_p.h index 1689581a2f6..90fce4fcfa4 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration_p.h +++ b/src/plugins/platforms/wayland/qwaylandintegration_p.h @@ -86,8 +86,10 @@ public: QPlatformFontDatabase *fontDatabase() const Q_DECL_OVERRIDE; QPlatformNativeInterface *nativeInterface() const Q_DECL_OVERRIDE; -#if QT_CONFIG(draganddrop) +#if QT_CONFIG(clipboard) QPlatformClipboard *clipboard() const Q_DECL_OVERRIDE; +#endif +#if QT_CONFIG(draganddrop) QPlatformDrag *drag() const Q_DECL_OVERRIDE; #endif QPlatformInputContext *inputContext() const Q_DECL_OVERRIDE; @@ -131,8 +133,10 @@ private: QWaylandShellIntegration *createShellIntegration(const QString& interfaceName); QScopedPointer mFontDb; -#if QT_CONFIG(draganddrop) +#if QT_CONFIG(clipboard) QScopedPointer mClipboard; +#endif +#if QT_CONFIG(draganddrop) QScopedPointer mDrag; #endif QScopedPointer mNativeInterface; From cfcc462166fa7a0d916089faf42d3df0abb8986e Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Fri, 13 Jan 2017 20:19:17 +0900 Subject: [PATCH 5/7] Fix build without feature.cursor Change-Id: If244e7ac58133ae6fbefacfa243d47fa210140be Reviewed-by: Lars Knoll --- src/plugins/platforms/wayland/client.pro | 13 +++++++++--- .../plugins/decorations/bradient/main.cpp | 20 +++++++++++++++++++ .../platforms/wayland/qwaylandcursor_p.h | 3 +++ .../platforms/wayland/qwaylandinputdevice.cpp | 10 ++++++++++ .../platforms/wayland/qwaylandinputdevice_p.h | 8 ++++++++ .../platforms/wayland/qwaylandscreen.cpp | 8 ++++++++ .../platforms/wayland/qwaylandscreen_p.h | 4 ++++ .../platforms/wayland/qwaylandwindow.cpp | 8 ++++++++ .../platforms/wayland/qwaylandwindow_p.h | 2 ++ 9 files changed, 73 insertions(+), 3 deletions(-) diff --git a/src/plugins/platforms/wayland/client.pro b/src/plugins/platforms/wayland/client.pro index f1338cc9911..6904e905c05 100644 --- a/src/plugins/platforms/wayland/client.pro +++ b/src/plugins/platforms/wayland/client.pro @@ -18,7 +18,7 @@ CONFIG += link_pkgconfig wayland-scanner qtConfig(xkbcommon-evdev): \ QMAKE_USE_PRIVATE += xkbcommon_evdev -QMAKE_USE += wayland-client wayland-cursor +QMAKE_USE += wayland-client INCLUDEPATH += $$PWD/../shared @@ -35,7 +35,6 @@ SOURCES += qwaylandintegration.cpp \ qwaylandnativeinterface.cpp \ qwaylandshmbackingstore.cpp \ qwaylandinputdevice.cpp \ - qwaylandcursor.cpp \ qwaylanddisplay.cpp \ qwaylandwindow.cpp \ qwaylandscreen.cpp \ @@ -69,7 +68,6 @@ SOURCES += qwaylandintegration.cpp \ HEADERS += qwaylandintegration_p.h \ qwaylandnativeinterface_p.h \ - qwaylandcursor_p.h \ qwaylanddisplay_p.h \ qwaylandwindow_p.h \ qwaylandscreen_p.h \ @@ -116,6 +114,15 @@ include(shellintegration/shellintegration.pri) include(inputdeviceintegration/inputdeviceintegration.pri) include(global/global.pri) +qtConfig(cursor) { + QMAKE_USE += wayland-cursor + + HEADERS += \ + qwaylandcursor_p.h + SOURCES += \ + qwaylandcursor.cpp +} + CONFIG += generated_privates MODULE_PLUGIN_TYPES = \ wayland-graphics-integration-client \ diff --git a/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp b/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp index f57b816e845..3928a9f1021 100644 --- a/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp +++ b/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp @@ -372,7 +372,9 @@ bool QWaylandBradientDecoration::handleMouse(QWaylandInputDevice *inputDevice, c } else if (local.x() > window()->width() + margins().left()) { processMouseRight(inputDevice,local,b,mods); } else { +#if QT_CONFIG(cursor) waylandWindow()->restoreMouseCursor(inputDevice); +#endif setMouseButtons(b); return false; } @@ -409,19 +411,27 @@ void QWaylandBradientDecoration::processMouseTop(QWaylandInputDevice *inputDevic if (local.y() <= margins().bottom()) { if (local.x() <= margins().left()) { //top left bit +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SizeFDiagCursor); +#endif startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP_LEFT,b); } else if (local.x() > window()->width() + margins().left()) { //top right bit +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SizeBDiagCursor); +#endif startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP_RIGHT,b); } else { //top reszie bit +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SplitVCursor); +#endif startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP,b); } } else { +#if QT_CONFIG(cursor) waylandWindow()->restoreMouseCursor(inputDevice); +#endif startMove(inputDevice,b); } @@ -432,15 +442,21 @@ void QWaylandBradientDecoration::processMouseBottom(QWaylandInputDevice *inputDe Q_UNUSED(mods); if (local.x() <= margins().left()) { //bottom left bit +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SizeBDiagCursor); +#endif startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT,b); } else if (local.x() > window()->width() + margins().left()) { //bottom right bit +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SizeFDiagCursor); +#endif startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT,b); } else { //bottom bit +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SplitVCursor); +#endif startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_BOTTOM,b); } } @@ -449,7 +465,9 @@ void QWaylandBradientDecoration::processMouseLeft(QWaylandInputDevice *inputDevi { Q_UNUSED(local); Q_UNUSED(mods); +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SplitHCursor); +#endif startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_LEFT,b); } @@ -457,7 +475,9 @@ void QWaylandBradientDecoration::processMouseRight(QWaylandInputDevice *inputDev { Q_UNUSED(local); Q_UNUSED(mods); +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SplitHCursor); +#endif startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_RIGHT,b); } diff --git a/src/plugins/platforms/wayland/qwaylandcursor_p.h b/src/plugins/platforms/wayland/qwaylandcursor_p.h index a7d188f5669..97921f9ccc0 100644 --- a/src/plugins/platforms/wayland/qwaylandcursor_p.h +++ b/src/plugins/platforms/wayland/qwaylandcursor_p.h @@ -55,6 +55,8 @@ #include #include +#if QT_CONFIG(cursor) + struct wl_cursor; struct wl_cursor_image; struct wl_cursor_theme; @@ -128,4 +130,5 @@ private: QT_END_NAMESPACE +#endif // cursor #endif // QWAYLANDCURSOR_H diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp index 4e8ef7b6787..fb22c95e673 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp +++ b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp @@ -62,7 +62,9 @@ #include #include +#if QT_CONFIG(cursor) #include +#endif #include @@ -145,10 +147,14 @@ QWaylandInputDevice::Pointer::Pointer(QWaylandInputDevice *p) : mParent(p) , mFocus(0) , mEnterSerial(0) +#if QT_CONFIG(cursor) , mCursorSerial(0) +#endif , mButtons(0) +#if QT_CONFIG(cursor) , mCursorBuffer(nullptr) , mCursorShape(Qt::BitmapCursor) +#endif { } @@ -344,6 +350,7 @@ Qt::KeyboardModifiers QWaylandInputDevice::Keyboard::modifiers() const return ret; } +#if QT_CONFIG(cursor) uint32_t QWaylandInputDevice::cursorSerial() const { if (mPointer) @@ -415,6 +422,7 @@ void QWaylandInputDevice::setCursor(const QSharedPointer &buffer setCursor(buffer->buffer(), hotSpot, buffer->size()); mPixmapCursor = buffer; } +#endif class EnterEvent : public QWaylandPointerEvent { @@ -431,7 +439,9 @@ void QWaylandInputDevice::Pointer::pointer_enter(uint32_t serial, struct wl_surf return; QWaylandWindow *window = QWaylandWindow::fromWlSurface(surface); +#if QT_CONFIG(cursor) window->window()->setCursor(window->window()->cursor()); +#endif mFocus = window; mSurfacePos = QPointF(wl_fixed_to_double(sx), wl_fixed_to_double(sy)); diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice_p.h b/src/plugins/platforms/wayland/qwaylandinputdevice_p.h index 6d458e35ddd..f2bbd0dc002 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice_p.h +++ b/src/plugins/platforms/wayland/qwaylandinputdevice_p.h @@ -72,7 +72,9 @@ #include +#if QT_CONFIG(cursor) struct wl_cursor_image; +#endif QT_BEGIN_NAMESPACE @@ -100,10 +102,12 @@ public: struct ::wl_seat *wl_seat() { return QtWayland::wl_seat::object(); } +#if QT_CONFIG(cursor) void setCursor(const QCursor &cursor, QWaylandScreen *screen); void setCursor(struct wl_buffer *buffer, struct ::wl_cursor_image *image); void setCursor(struct wl_buffer *buffer, const QPoint &hotSpot, const QSize &size); void setCursor(const QSharedPointer &buffer, const QPoint &hotSpot); +#endif void handleWindowDestroyed(QWaylandWindow *window); void handleEndDrag(); @@ -247,12 +251,16 @@ public: QWaylandInputDevice *mParent; QWaylandWindow *mFocus; uint32_t mEnterSerial; +#if QT_CONFIG(cursor) uint32_t mCursorSerial; +#endif QPointF mSurfacePos; QPointF mGlobalPos; Qt::MouseButtons mButtons; +#if QT_CONFIG(cursor) wl_buffer *mCursorBuffer; Qt::CursorShape mCursorShape; +#endif }; class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDevice::Touch : public QtWayland::wl_touch diff --git a/src/plugins/platforms/wayland/qwaylandscreen.cpp b/src/plugins/platforms/wayland/qwaylandscreen.cpp index 5dbfe5e9d98..31d21a1c34e 100644 --- a/src/plugins/platforms/wayland/qwaylandscreen.cpp +++ b/src/plugins/platforms/wayland/qwaylandscreen.cpp @@ -64,18 +64,24 @@ QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uin , mFormat(QImage::Format_ARGB32_Premultiplied) , mOutputName(QStringLiteral("Screen%1").arg(id)) , m_orientation(Qt::PrimaryOrientation) +#if QT_CONFIG(cursor) , mWaylandCursor(0) +#endif { } QWaylandScreen::~QWaylandScreen() { +#if QT_CONFIG(cursor) delete mWaylandCursor; +#endif } void QWaylandScreen::init() { +#if QT_CONFIG(cursor) mWaylandCursor = new QWaylandCursor(this); +#endif } QWaylandDisplay * QWaylandScreen::display() const @@ -156,10 +162,12 @@ qreal QWaylandScreen::refreshRate() const return mRefreshRate / 1000.f; } +#if QT_CONFIG(cursor) QPlatformCursor *QWaylandScreen::cursor() const { return mWaylandCursor; } +#endif QWaylandScreen * QWaylandScreen::waylandScreenFromWindow(QWindow *window) { diff --git a/src/plugins/platforms/wayland/qwaylandscreen_p.h b/src/plugins/platforms/wayland/qwaylandscreen_p.h index 9c1f4673869..f9f0776ffbe 100644 --- a/src/plugins/platforms/wayland/qwaylandscreen_p.h +++ b/src/plugins/platforms/wayland/qwaylandscreen_p.h @@ -90,8 +90,10 @@ public: QString name() const Q_DECL_OVERRIDE { return mOutputName; } +#if QT_CONFIG(cursor) QPlatformCursor *cursor() const Q_DECL_OVERRIDE; QWaylandCursor *waylandCursor() const { return mWaylandCursor; }; +#endif uint32_t outputId() const { return m_outputId; } ::wl_output *output() { return object(); } @@ -121,7 +123,9 @@ private: QString mOutputName; Qt::ScreenOrientation m_orientation; +#if QT_CONFIG(cursor) QWaylandCursor *mWaylandCursor; +#endif }; } diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index ca99f3de18f..8087921a6c7 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -709,8 +709,10 @@ void QWaylandWindow::handleMouse(QWaylandInputDevice *inputDevice, const QWaylan } } +#if QT_CONFIG(cursor) if (e.type == QWaylandPointerEvent::Enter) restoreMouseCursor(inputDevice); +#endif } void QWaylandWindow::handleMouseLeave(QWaylandInputDevice *inputDevice) @@ -722,7 +724,9 @@ void QWaylandWindow::handleMouseLeave(QWaylandInputDevice *inputDevice) } else { QWindowSystemInterface::handleLeaveEvent(window()); } +#if QT_CONFIG(cursor) restoreMouseCursor(inputDevice); +#endif } bool QWaylandWindow::touchDragDecoration(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, Qt::TouchPointState state, Qt::KeyboardModifiers mods) @@ -754,7 +758,9 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe globalTranslated.setX(globalTranslated.x() - marg.left()); globalTranslated.setY(globalTranslated.y() - marg.top()); if (!mMouseEventsInContentArea) { +#if QT_CONFIG(cursor) restoreMouseCursor(inputDevice); +#endif QWindowSystemInterface::handleEnterEvent(window()); } @@ -780,6 +786,7 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe } } +#if QT_CONFIG(cursor) void QWaylandWindow::setMouseCursor(QWaylandInputDevice *device, const QCursor &cursor) { device->setCursor(cursor, mScreen); @@ -789,6 +796,7 @@ void QWaylandWindow::restoreMouseCursor(QWaylandInputDevice *device) { setMouseCursor(device, window()->cursor()); } +#endif void QWaylandWindow::requestActivateWindow() { diff --git a/src/plugins/platforms/wayland/qwaylandwindow_p.h b/src/plugins/platforms/wayland/qwaylandwindow_p.h index ce295a0de3b..7b48e890f05 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow_p.h +++ b/src/plugins/platforms/wayland/qwaylandwindow_p.h @@ -176,8 +176,10 @@ public: inline bool isMaximized() const { return mState == Qt::WindowMaximized; } inline bool isFullscreen() const { return mState == Qt::WindowFullScreen; } +#if QT_CONFIG(cursor) void setMouseCursor(QWaylandInputDevice *device, const QCursor &cursor); void restoreMouseCursor(QWaylandInputDevice *device); +#endif QWaylandWindow *transientParent() const; From 0dadfc42335cb1cc4fb66bb7d6ecd56213a6cced Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Fri, 13 Jan 2017 19:05:32 +0900 Subject: [PATCH 6/7] Fix build without feature.draganddrop Change-Id: I4fff1a8d48483298eebecdc751fe76e80444bd99 Reviewed-by: Lars Knoll --- src/plugins/platforms/wayland/client.pro | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforms/wayland/client.pro b/src/plugins/platforms/wayland/client.pro index 6904e905c05..92d4309ff66 100644 --- a/src/plugins/platforms/wayland/client.pro +++ b/src/plugins/platforms/wayland/client.pro @@ -39,7 +39,6 @@ SOURCES += qwaylandintegration.cpp \ qwaylandwindow.cpp \ qwaylandscreen.cpp \ qwaylandshmwindow.cpp \ - qwaylanddnd.cpp \ qwaylanddataoffer.cpp \ qwaylanddatadevicemanager.cpp \ qwaylanddatasource.cpp \ @@ -62,7 +61,6 @@ SOURCES += qwaylandintegration.cpp \ qwaylanddecorationplugin.cpp \ qwaylandwindowmanagerintegration.cpp \ qwaylandinputcontext.cpp \ - qwaylanddatadevice.cpp \ qwaylandshm.cpp \ qwaylandbuffer.cpp \ @@ -75,7 +73,6 @@ HEADERS += qwaylandintegration_p.h \ qwaylandinputdevice_p.h \ qwaylandbuffer_p.h \ qwaylandshmwindow_p.h \ - qwaylanddnd_p.h \ qwaylanddataoffer_p.h \ qwaylanddatadevicemanager_p.h \ qwaylanddatasource_p.h \ @@ -95,7 +92,6 @@ HEADERS += qwaylandintegration_p.h \ qwaylanddecorationplugin_p.h \ qwaylandwindowmanagerintegration_p.h \ qwaylandinputcontext_p.h \ - qwaylanddatadevice_p.h \ qwaylandshm_p.h \ qtwaylandclientglobal.h \ qtwaylandclientglobal_p.h \ @@ -122,6 +118,14 @@ qtConfig(cursor) { SOURCES += \ qwaylandcursor.cpp } +qtConfig(draganddrop) { + HEADERS += \ + qwaylanddnd_p.h \ + qwaylanddatadevice_p.h + SOURCES += \ + qwaylanddnd.cpp \ + qwaylanddatadevice.cpp +} CONFIG += generated_privates MODULE_PLUGIN_TYPES = \ From 2b7ad7f8a8192e6c410f4c8b29669655c767f01f Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Thu, 12 Jan 2017 13:25:48 +0100 Subject: [PATCH 7/7] Replace all occurrences of Q_DECL_OVERRIDE with override Change-Id: I16b7b23efe944b49d1fcc9e7588cdb0a991cebd1 Reviewed-by: Paul Olav Tvete --- .../wayland/global/qwaylandclientextension.h | 2 +- .../qwaylandhardwareintegration_p.h | 4 +- .../plugins/decorations/bradient/main.cpp | 10 ++-- .../hardwareintegration/brcm-egl/main.cpp | 2 +- .../drm-egl-server/main.cpp | 2 +- .../libhybris-egl-server/main.cpp | 2 +- .../hardwareintegration/wayland-egl/main.cpp | 2 +- .../xcomposite-egl/main.cpp | 2 +- .../xcomposite-glx/main.cpp | 2 +- .../platforms/wayland/qwaylandclipboard_p.h | 8 +-- .../platforms/wayland/qwaylandcursor_p.h | 8 +-- .../platforms/wayland/qwaylanddatadevice_p.h | 12 ++--- .../platforms/wayland/qwaylanddataoffer_p.h | 8 +-- .../platforms/wayland/qwaylanddatasource_p.h | 6 +-- .../platforms/wayland/qwaylanddisplay_p.h | 4 +- src/plugins/platforms/wayland/qwaylanddnd_p.h | 12 ++--- .../wayland/qwaylandextendedsurface_p.h | 6 +-- .../wayland/qwaylandinputcontext_p.h | 52 +++++++++---------- .../platforms/wayland/qwaylandinputdevice_p.h | 32 ++++++------ .../platforms/wayland/qwaylandintegration_p.h | 32 ++++++------ .../wayland/qwaylandnativeinterface_p.h | 18 +++---- .../platforms/wayland/qwaylandqtkey_p.h | 2 +- .../platforms/wayland/qwaylandscreen_p.h | 32 ++++++------ .../wayland/qwaylandshmbackingstore_p.h | 14 ++--- .../platforms/wayland/qwaylandshmwindow_p.h | 4 +- .../platforms/wayland/qwaylandtouch_p.h | 4 +- .../platforms/wayland/qwaylandwindow_p.h | 40 +++++++------- .../qwaylandwindowmanagerintegration_p.h | 10 ++-- .../wayland/qwaylandwlshellintegration_p.h | 4 +- .../wayland/qwaylandwlshellsurface_p.h | 32 ++++++------ .../platforms/wayland/qwaylandxdgshell_p.h | 2 +- .../wayland/qwaylandxdgshellintegration_p.h | 6 +-- .../platforms/wayland/qwaylandxdgsurface_p.h | 30 +++++------ tests/auto/wayland/client/mockinput.h | 14 ++--- tests/auto/wayland/client/mocksurface.h | 12 ++--- tests/auto/wayland/client/tst_client.cpp | 4 +- 36 files changed, 218 insertions(+), 218 deletions(-) diff --git a/src/plugins/platforms/wayland/global/qwaylandclientextension.h b/src/plugins/platforms/wayland/global/qwaylandclientextension.h index abf753249da..7e11bb47f72 100644 --- a/src/plugins/platforms/wayland/global/qwaylandclientextension.h +++ b/src/plugins/platforms/wayland/global/qwaylandclientextension.h @@ -87,7 +87,7 @@ public: { } - const struct wl_interface *extensionInterface() const Q_DECL_OVERRIDE + const struct wl_interface *extensionInterface() const override { return T::interface(); } diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandhardwareintegration_p.h b/src/plugins/platforms/wayland/hardwareintegration/qwaylandhardwareintegration_p.h index 8b4a7162927..31b4209dc0d 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandhardwareintegration_p.h +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandhardwareintegration_p.h @@ -69,8 +69,8 @@ public: QString serverBufferIntegration(); protected: - void hardware_integration_client_backend(const QString &name) Q_DECL_OVERRIDE; - void hardware_integration_server_backend(const QString &name) Q_DECL_OVERRIDE; + void hardware_integration_client_backend(const QString &name) override; + void hardware_integration_server_backend(const QString &name) override; private: QString m_client_buffer; diff --git a/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp b/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp index 3928a9f1021..074c74522d2 100644 --- a/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp +++ b/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp @@ -135,10 +135,10 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandBradientDecoration : public QWaylandAbstra public: QWaylandBradientDecoration(); protected: - QMargins margins() const Q_DECL_OVERRIDE; - void paint(QPaintDevice *device) Q_DECL_OVERRIDE; - bool handleMouse(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global,Qt::MouseButtons b,Qt::KeyboardModifiers mods) Q_DECL_OVERRIDE; - bool handleTouch(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, Qt::TouchPointState state, Qt::KeyboardModifiers mods) Q_DECL_OVERRIDE; + QMargins margins() const override; + void paint(QPaintDevice *device) override; + bool handleMouse(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global,Qt::MouseButtons b,Qt::KeyboardModifiers mods) override; + bool handleTouch(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, Qt::TouchPointState state, Qt::KeyboardModifiers mods) override; private: void processMouseTop(QWaylandInputDevice *inputDevice, const QPointF &local, Qt::MouseButtons b,Qt::KeyboardModifiers mods); void processMouseBottom(QWaylandInputDevice *inputDevice, const QPointF &local, Qt::MouseButtons b,Qt::KeyboardModifiers mods); @@ -486,7 +486,7 @@ class QWaylandBradientDecorationPlugin : public QWaylandDecorationPlugin Q_OBJECT Q_PLUGIN_METADATA(IID QWaylandDecorationFactoryInterface_iid FILE "bradient.json") public: - QWaylandAbstractDecoration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE; + QWaylandAbstractDecoration *create(const QString&, const QStringList&) override; }; QWaylandAbstractDecoration *QWaylandBradientDecorationPlugin::create(const QString& system, const QStringList& paramList) diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/main.cpp b/src/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/main.cpp index ea66995d45f..4f5a2ae3c39 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/main.cpp +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/main.cpp @@ -49,7 +49,7 @@ class QWaylandBrcmEglClientBufferPlugin : public QWaylandClientBufferIntegration Q_OBJECT Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "brcm-egl.json") public: - QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE; + QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override; }; QWaylandClientBufferIntegration *QWaylandBrcmEglClientBufferPlugin::create(const QString& system, const QStringList& paramList) diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/main.cpp b/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/main.cpp index 9149d588caa..70c9e300a44 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/main.cpp +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/main.cpp @@ -49,7 +49,7 @@ class DrmEglServerBufferPlugin : public QWaylandServerBufferIntegrationPlugin Q_OBJECT Q_PLUGIN_METADATA(IID QWaylandServerBufferIntegrationFactoryInterface_iid FILE "drm-egl-server.json") public: - QWaylandServerBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE; + QWaylandServerBufferIntegration *create(const QString&, const QStringList&) override; }; QWaylandServerBufferIntegration *DrmEglServerBufferPlugin::create(const QString& system, const QStringList& paramList) diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/libhybris-egl-server/main.cpp b/src/plugins/platforms/wayland/plugins/hardwareintegration/libhybris-egl-server/main.cpp index f7ae0cdfa5b..417597c368d 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/libhybris-egl-server/main.cpp +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/libhybris-egl-server/main.cpp @@ -49,7 +49,7 @@ class LibHybrisEglServerBufferPlugin : public QWaylandServerBufferIntegrationPlu Q_OBJECT Q_PLUGIN_METADATA(IID QWaylandServerBufferIntegrationFactoryInterface_iid FILE "libhybris-egl-server.json") public: - QWaylandServerBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE; + QWaylandServerBufferIntegration *create(const QString&, const QStringList&) override; }; QWaylandServerBufferIntegration *LibHybrisEglServerBufferPlugin::create(const QString& system, const QStringList& paramList) diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/main.cpp b/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/main.cpp index 364e18affcd..05053ff950d 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/main.cpp +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/main.cpp @@ -49,7 +49,7 @@ class QWaylandEglClientBufferPlugin : public QWaylandClientBufferIntegrationPlug Q_OBJECT Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "wayland-egl.json") public: - QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE; + QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override; }; QWaylandClientBufferIntegration *QWaylandEglClientBufferPlugin::create(const QString& system, const QStringList& paramList) diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/main.cpp b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/main.cpp index ea4f397053b..07222f2374c 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/main.cpp +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/main.cpp @@ -49,7 +49,7 @@ class QWaylandXCompositeEglClientBufferIntegrationPlugin : public QWaylandClient Q_OBJECT Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-egl.json") public: - QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE; + QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override; }; QWaylandClientBufferIntegration *QWaylandXCompositeEglClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList) diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/main.cpp b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/main.cpp index 0a04f716c27..00fa255b52e 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/main.cpp +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/main.cpp @@ -49,7 +49,7 @@ class QWaylandXCompositeGlxClientBufferIntegrationPlugin : public QWaylandClient Q_OBJECT Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-glx.json") public: - QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE; + QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override; }; QWaylandClientBufferIntegration *QWaylandXCompositeGlxClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList) diff --git a/src/plugins/platforms/wayland/qwaylandclipboard_p.h b/src/plugins/platforms/wayland/qwaylandclipboard_p.h index 584322e07db..211a969420b 100644 --- a/src/plugins/platforms/wayland/qwaylandclipboard_p.h +++ b/src/plugins/platforms/wayland/qwaylandclipboard_p.h @@ -71,10 +71,10 @@ public: ~QWaylandClipboard(); - QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard) Q_DECL_OVERRIDE; - void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard) Q_DECL_OVERRIDE; - bool supportsMode(QClipboard::Mode mode) const Q_DECL_OVERRIDE; - bool ownsMode(QClipboard::Mode mode) const Q_DECL_OVERRIDE; + QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard) override; + void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard) override; + bool supportsMode(QClipboard::Mode mode) const override; + bool ownsMode(QClipboard::Mode mode) const override; private: QWaylandDisplay *mDisplay; diff --git a/src/plugins/platforms/wayland/qwaylandcursor_p.h b/src/plugins/platforms/wayland/qwaylandcursor_p.h index 97921f9ccc0..916a464e455 100644 --- a/src/plugins/platforms/wayland/qwaylandcursor_p.h +++ b/src/plugins/platforms/wayland/qwaylandcursor_p.h @@ -75,10 +75,10 @@ public: QWaylandCursor(QWaylandScreen *screen); ~QWaylandCursor(); - void changeCursor(QCursor *cursor, QWindow *window) Q_DECL_OVERRIDE; - void pointerEvent(const QMouseEvent &event) Q_DECL_OVERRIDE; - QPoint pos() const Q_DECL_OVERRIDE; - void setPos(const QPoint &pos) Q_DECL_OVERRIDE; + void changeCursor(QCursor *cursor, QWindow *window) override; + void pointerEvent(const QMouseEvent &event) override; + QPoint pos() const override; + void setPos(const QPoint &pos) override; struct wl_cursor_image *cursorImage(Qt::CursorShape shape); QSharedPointer cursorBitmapImage(const QCursor *cursor); diff --git a/src/plugins/platforms/wayland/qwaylanddatadevice_p.h b/src/plugins/platforms/wayland/qwaylanddatadevice_p.h index 0b16f97d2c0..1ec8761b913 100644 --- a/src/plugins/platforms/wayland/qwaylanddatadevice_p.h +++ b/src/plugins/platforms/wayland/qwaylanddatadevice_p.h @@ -92,12 +92,12 @@ public: void cancelDrag(); protected: - void data_device_data_offer(struct ::wl_data_offer *id) Q_DECL_OVERRIDE; - void data_device_drop() Q_DECL_OVERRIDE; - void data_device_enter(uint32_t serial, struct ::wl_surface *surface, wl_fixed_t x, wl_fixed_t y, struct ::wl_data_offer *id) Q_DECL_OVERRIDE; - void data_device_leave() Q_DECL_OVERRIDE; - void data_device_motion(uint32_t time, wl_fixed_t x, wl_fixed_t y) Q_DECL_OVERRIDE; - void data_device_selection(struct ::wl_data_offer *id) Q_DECL_OVERRIDE; + void data_device_data_offer(struct ::wl_data_offer *id) override; + void data_device_drop() override; + void data_device_enter(uint32_t serial, struct ::wl_surface *surface, wl_fixed_t x, wl_fixed_t y, struct ::wl_data_offer *id) override; + void data_device_leave() override; + void data_device_motion(uint32_t time, wl_fixed_t x, wl_fixed_t y) override; + void data_device_selection(struct ::wl_data_offer *id) override; private Q_SLOTS: void selectionSourceCancelled(); diff --git a/src/plugins/platforms/wayland/qwaylanddataoffer_p.h b/src/plugins/platforms/wayland/qwaylanddataoffer_p.h index 96799c861e8..c7520f3e55c 100644 --- a/src/plugins/platforms/wayland/qwaylanddataoffer_p.h +++ b/src/plugins/platforms/wayland/qwaylanddataoffer_p.h @@ -75,7 +75,7 @@ public: QMimeData *mimeData(); protected: - void data_offer_offer(const QString &mime_type) Q_DECL_OVERRIDE; + void data_offer_offer(const QString &mime_type) override; private: QScopedPointer m_mimeData; @@ -90,9 +90,9 @@ public: void appendFormat(const QString &mimeType); protected: - bool hasFormat_sys(const QString &mimeType) const Q_DECL_OVERRIDE; - QStringList formats_sys() const Q_DECL_OVERRIDE; - QVariant retrieveData_sys(const QString &mimeType, QVariant::Type type) const Q_DECL_OVERRIDE; + bool hasFormat_sys(const QString &mimeType) const override; + QStringList formats_sys() const override; + QVariant retrieveData_sys(const QString &mimeType, QVariant::Type type) const override; private: int readData(int fd, QByteArray &data) const; diff --git a/src/plugins/platforms/wayland/qwaylanddatasource_p.h b/src/plugins/platforms/wayland/qwaylanddatasource_p.h index 540e6ad7a1d..0221304c80d 100644 --- a/src/plugins/platforms/wayland/qwaylanddatasource_p.h +++ b/src/plugins/platforms/wayland/qwaylanddatasource_p.h @@ -81,9 +81,9 @@ Q_SIGNALS: void cancelled(); protected: - void data_source_cancelled() Q_DECL_OVERRIDE; - void data_source_send(const QString &mime_type, int32_t fd) Q_DECL_OVERRIDE; - void data_source_target(const QString &mime_type) Q_DECL_OVERRIDE; + void data_source_cancelled() override; + void data_source_send(const QString &mime_type, int32_t fd) override; + void data_source_target(const QString &mime_type) override; private: QWaylandDisplay *m_display; diff --git a/src/plugins/platforms/wayland/qwaylanddisplay_p.h b/src/plugins/platforms/wayland/qwaylanddisplay_p.h index a4631b95f84..e96a89176ba 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay_p.h +++ b/src/plugins/platforms/wayland/qwaylanddisplay_p.h @@ -225,8 +225,8 @@ private: struct wl_callback *mSyncCallback; static const wl_callback_listener syncCallbackListener; - void registry_global(uint32_t id, const QString &interface, uint32_t version) Q_DECL_OVERRIDE; - void registry_global_remove(uint32_t id) Q_DECL_OVERRIDE; + void registry_global(uint32_t id, const QString &interface, uint32_t version) override; + void registry_global_remove(uint32_t id) override; static void shellHandleConfigure(void *data, struct wl_shell *shell, uint32_t time, uint32_t edges, diff --git a/src/plugins/platforms/wayland/qwaylanddnd_p.h b/src/plugins/platforms/wayland/qwaylanddnd_p.h index 215a8b74d07..2a99432c59d 100644 --- a/src/plugins/platforms/wayland/qwaylanddnd_p.h +++ b/src/plugins/platforms/wayland/qwaylanddnd_p.h @@ -71,18 +71,18 @@ public: QWaylandDrag(QWaylandDisplay *display); ~QWaylandDrag(); - QMimeData *platformDropData() Q_DECL_OVERRIDE; + QMimeData *platformDropData() override; void updateTarget(const QString &mimeType); void setResponse(const QPlatformDragQtResponse &response); void finishDrag(const QPlatformDropQtResponse &response); protected: - void startDrag() Q_DECL_OVERRIDE; - void cancel() Q_DECL_OVERRIDE; - void move(const QPoint &globalPos) Q_DECL_OVERRIDE; - void drop(const QPoint &globalPos) Q_DECL_OVERRIDE; - void endDrag() Q_DECL_OVERRIDE; + void startDrag() override; + void cancel() override; + void move(const QPoint &globalPos) override; + void drop(const QPoint &globalPos) override; + void endDrag() override; private: diff --git a/src/plugins/platforms/wayland/qwaylandextendedsurface_p.h b/src/plugins/platforms/wayland/qwaylandextendedsurface_p.h index 39dc4fcf05f..02700b2901d 100644 --- a/src/plugins/platforms/wayland/qwaylandextendedsurface_p.h +++ b/src/plugins/platforms/wayland/qwaylandextendedsurface_p.h @@ -79,9 +79,9 @@ public: Qt::WindowFlags setWindowFlags(Qt::WindowFlags flags); private: - void extended_surface_onscreen_visibility(int32_t visibility) Q_DECL_OVERRIDE; - void extended_surface_set_generic_property(const QString &name, wl_array *value) Q_DECL_OVERRIDE; - void extended_surface_close() Q_DECL_OVERRIDE; + void extended_surface_onscreen_visibility(int32_t visibility) override; + void extended_surface_set_generic_property(const QString &name, wl_array *value) override; + void extended_surface_close() override; QWaylandWindow *m_window; QVariantMap m_properties; diff --git a/src/plugins/platforms/wayland/qwaylandinputcontext_p.h b/src/plugins/platforms/wayland/qwaylandinputcontext_p.h index 53eab994f5b..a131bc5bdf6 100644 --- a/src/plugins/platforms/wayland/qwaylandinputcontext_p.h +++ b/src/plugins/platforms/wayland/qwaylandinputcontext_p.h @@ -89,20 +89,20 @@ public: Qt::LayoutDirection inputDirection() const; protected: - void zwp_text_input_v2_enter(uint32_t serial, struct ::wl_surface *surface) Q_DECL_OVERRIDE; - void zwp_text_input_v2_leave(uint32_t serial, struct ::wl_surface *surface) Q_DECL_OVERRIDE; - void zwp_text_input_v2_modifiers_map(wl_array *map) Q_DECL_OVERRIDE; - void zwp_text_input_v2_input_panel_state(uint32_t state, int32_t x, int32_t y, int32_t width, int32_t height) Q_DECL_OVERRIDE; - void zwp_text_input_v2_preedit_string(const QString &text, const QString &commit) Q_DECL_OVERRIDE; - void zwp_text_input_v2_preedit_styling(uint32_t index, uint32_t length, uint32_t style) Q_DECL_OVERRIDE; - void zwp_text_input_v2_preedit_cursor(int32_t index) Q_DECL_OVERRIDE; - void zwp_text_input_v2_commit_string(const QString &text) Q_DECL_OVERRIDE; - void zwp_text_input_v2_cursor_position(int32_t index, int32_t anchor) Q_DECL_OVERRIDE; - void zwp_text_input_v2_delete_surrounding_text(uint32_t before_length, uint32_t after_length) Q_DECL_OVERRIDE; - void zwp_text_input_v2_keysym(uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers) Q_DECL_OVERRIDE; - void zwp_text_input_v2_language(const QString &language) Q_DECL_OVERRIDE; - void zwp_text_input_v2_text_direction(uint32_t direction) Q_DECL_OVERRIDE; - void zwp_text_input_v2_input_method_changed(uint32_t serial, uint32_t flags) Q_DECL_OVERRIDE; + void zwp_text_input_v2_enter(uint32_t serial, struct ::wl_surface *surface) override; + void zwp_text_input_v2_leave(uint32_t serial, struct ::wl_surface *surface) override; + void zwp_text_input_v2_modifiers_map(wl_array *map) override; + void zwp_text_input_v2_input_panel_state(uint32_t state, int32_t x, int32_t y, int32_t width, int32_t height) override; + void zwp_text_input_v2_preedit_string(const QString &text, const QString &commit) override; + void zwp_text_input_v2_preedit_styling(uint32_t index, uint32_t length, uint32_t style) override; + void zwp_text_input_v2_preedit_cursor(int32_t index) override; + void zwp_text_input_v2_commit_string(const QString &text) override; + void zwp_text_input_v2_cursor_position(int32_t index, int32_t anchor) override; + void zwp_text_input_v2_delete_surrounding_text(uint32_t before_length, uint32_t after_length) override; + void zwp_text_input_v2_keysym(uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers) override; + void zwp_text_input_v2_language(const QString &language) override; + void zwp_text_input_v2_text_direction(uint32_t direction) override; + void zwp_text_input_v2_input_method_changed(uint32_t serial, uint32_t flags) override; private: Qt::KeyboardModifiers modifiersToQtModifiers(uint32_t modifiers); @@ -134,23 +134,23 @@ public: explicit QWaylandInputContext(QWaylandDisplay *display); ~QWaylandInputContext(); - bool isValid() const Q_DECL_OVERRIDE; + bool isValid() const override; - void reset() Q_DECL_OVERRIDE; - void commit() Q_DECL_OVERRIDE; - void update(Qt::InputMethodQueries) Q_DECL_OVERRIDE; + void reset() override; + void commit() override; + void update(Qt::InputMethodQueries) override; - void invokeAction(QInputMethod::Action, int cursorPosition) Q_DECL_OVERRIDE; + void invokeAction(QInputMethod::Action, int cursorPosition) override; - void showInputPanel() Q_DECL_OVERRIDE; - void hideInputPanel() Q_DECL_OVERRIDE; - bool isInputPanelVisible() const Q_DECL_OVERRIDE; - QRectF keyboardRect() const Q_DECL_OVERRIDE; + void showInputPanel() override; + void hideInputPanel() override; + bool isInputPanelVisible() const override; + QRectF keyboardRect() const override; - QLocale locale() const Q_DECL_OVERRIDE; - Qt::LayoutDirection inputDirection() const Q_DECL_OVERRIDE; + QLocale locale() const override; + Qt::LayoutDirection inputDirection() const override; - void setFocusObject(QObject *object) Q_DECL_OVERRIDE; + void setFocusObject(QObject *object) override; private: QWaylandTextInput *textInput() const; diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice_p.h b/src/plugins/platforms/wayland/qwaylandinputdevice_p.h index f2bbd0dc002..d8bd0062f29 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice_p.h +++ b/src/plugins/platforms/wayland/qwaylandinputdevice_p.h @@ -154,7 +154,7 @@ private: uint32_t mTime; uint32_t mSerial; - void seat_capabilities(uint32_t caps) Q_DECL_OVERRIDE; + void seat_capabilities(uint32_t caps) override; void handleTouchPoint(int id, double x, double y, Qt::TouchPointState state); QTouchDevice *mTouchDevice; @@ -183,19 +183,19 @@ public: void keyboard_keymap(uint32_t format, int32_t fd, - uint32_t size) Q_DECL_OVERRIDE; + uint32_t size) override; void keyboard_enter(uint32_t time, struct wl_surface *surface, - struct wl_array *keys) Q_DECL_OVERRIDE; + struct wl_array *keys) override; void keyboard_leave(uint32_t time, - struct wl_surface *surface) Q_DECL_OVERRIDE; + struct wl_surface *surface) override; void keyboard_key(uint32_t serial, uint32_t time, - uint32_t key, uint32_t state) Q_DECL_OVERRIDE; + uint32_t key, uint32_t state) override; void keyboard_modifiers(uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, - uint32_t group) Q_DECL_OVERRIDE; + uint32_t group) override; QWaylandInputDevice *mParent; QWaylandWindow *mFocus; @@ -236,15 +236,15 @@ public: virtual ~Pointer(); void pointer_enter(uint32_t serial, struct wl_surface *surface, - wl_fixed_t sx, wl_fixed_t sy) Q_DECL_OVERRIDE; - void pointer_leave(uint32_t time, struct wl_surface *surface) Q_DECL_OVERRIDE; + wl_fixed_t sx, wl_fixed_t sy) override; + void pointer_leave(uint32_t time, struct wl_surface *surface) override; void pointer_motion(uint32_t time, - wl_fixed_t sx, wl_fixed_t sy) Q_DECL_OVERRIDE; + wl_fixed_t sx, wl_fixed_t sy) override; void pointer_button(uint32_t serial, uint32_t time, - uint32_t button, uint32_t state) Q_DECL_OVERRIDE; + uint32_t button, uint32_t state) override; void pointer_axis(uint32_t time, uint32_t axis, - wl_fixed_t value) Q_DECL_OVERRIDE; + wl_fixed_t value) override; void releaseButtons(); @@ -274,16 +274,16 @@ public: struct wl_surface *surface, int32_t id, wl_fixed_t x, - wl_fixed_t y) Q_DECL_OVERRIDE; + wl_fixed_t y) override; void touch_up(uint32_t serial, uint32_t time, - int32_t id) Q_DECL_OVERRIDE; + int32_t id) override; void touch_motion(uint32_t time, int32_t id, wl_fixed_t x, - wl_fixed_t y) Q_DECL_OVERRIDE; - void touch_frame() Q_DECL_OVERRIDE; - void touch_cancel() Q_DECL_OVERRIDE; + wl_fixed_t y) override; + void touch_frame() override; + void touch_cancel() override; bool allTouchPointsReleased(); void releasePoints(); diff --git a/src/plugins/platforms/wayland/qwaylandintegration_p.h b/src/plugins/platforms/wayland/qwaylandintegration_p.h index 90fce4fcfa4..174eca25315 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration_p.h +++ b/src/plugins/platforms/wayland/qwaylandintegration_p.h @@ -73,40 +73,40 @@ public: QWaylandIntegration(); ~QWaylandIntegration(); - bool hasCapability(QPlatformIntegration::Capability cap) const Q_DECL_OVERRIDE; - QPlatformWindow *createPlatformWindow(QWindow *window) const Q_DECL_OVERRIDE; + bool hasCapability(QPlatformIntegration::Capability cap) const override; + QPlatformWindow *createPlatformWindow(QWindow *window) const override; #if QT_CONFIG(opengl) - QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const Q_DECL_OVERRIDE; + QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override; #endif - QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const Q_DECL_OVERRIDE; + QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const override; - QAbstractEventDispatcher *createEventDispatcher() const Q_DECL_OVERRIDE; - void initialize() Q_DECL_OVERRIDE; + QAbstractEventDispatcher *createEventDispatcher() const override; + void initialize() override; - QPlatformFontDatabase *fontDatabase() const Q_DECL_OVERRIDE; + QPlatformFontDatabase *fontDatabase() const override; - QPlatformNativeInterface *nativeInterface() const Q_DECL_OVERRIDE; + QPlatformNativeInterface *nativeInterface() const override; #if QT_CONFIG(clipboard) - QPlatformClipboard *clipboard() const Q_DECL_OVERRIDE; + QPlatformClipboard *clipboard() const override; #endif #if QT_CONFIG(draganddrop) - QPlatformDrag *drag() const Q_DECL_OVERRIDE; + QPlatformDrag *drag() const override; #endif - QPlatformInputContext *inputContext() const Q_DECL_OVERRIDE; + QPlatformInputContext *inputContext() const override; - QVariant styleHint(StyleHint hint) const Q_DECL_OVERRIDE; + QVariant styleHint(StyleHint hint) const override; #if QT_CONFIG(accessibility) - QPlatformAccessibility *accessibility() const Q_DECL_OVERRIDE; + QPlatformAccessibility *accessibility() const override; #endif - QPlatformServices *services() const Q_DECL_OVERRIDE; + QPlatformServices *services() const override; QWaylandDisplay *display() const; - QStringList themeNames() const Q_DECL_OVERRIDE; + QStringList themeNames() const override; - QPlatformTheme *createPlatformTheme(const QString &name) const Q_DECL_OVERRIDE; + QPlatformTheme *createPlatformTheme(const QString &name) const override; QWaylandInputDevice *createInputDevice(QWaylandDisplay *display, int version, uint32_t id); diff --git a/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h b/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h index 7b8b2834255..c83180c0995 100644 --- a/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h +++ b/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h @@ -67,22 +67,22 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandNativeInterface : public QPlatformNativeIn { public: QWaylandNativeInterface(QWaylandIntegration *integration); - void *nativeResourceForIntegration(const QByteArray &resource) Q_DECL_OVERRIDE; + void *nativeResourceForIntegration(const QByteArray &resource) override; void *nativeResourceForWindow(const QByteArray &resourceString, - QWindow *window) Q_DECL_OVERRIDE; + QWindow *window) override; void *nativeResourceForScreen(const QByteArray &resourceString, - QScreen *screen) Q_DECL_OVERRIDE; + QScreen *screen) override; #if QT_CONFIG(opengl) - void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) Q_DECL_OVERRIDE; + void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) override; #endif - QVariantMap windowProperties(QPlatformWindow *window) const Q_DECL_OVERRIDE; - QVariant windowProperty(QPlatformWindow *window, const QString &name) const Q_DECL_OVERRIDE; - QVariant windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const Q_DECL_OVERRIDE; - void setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value) Q_DECL_OVERRIDE; + QVariantMap windowProperties(QPlatformWindow *window) const override; + QVariant windowProperty(QPlatformWindow *window, const QString &name) const override; + QVariant windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const override; + void setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value) override; void emitWindowPropertyChanged(QPlatformWindow *window, const QString &name); - QFunctionPointer platformFunction(const QByteArray &resource) const Q_DECL_OVERRIDE; + QFunctionPointer platformFunction(const QByteArray &resource) const override; private: QWaylandIntegration *m_integration; diff --git a/src/plugins/platforms/wayland/qwaylandqtkey_p.h b/src/plugins/platforms/wayland/qwaylandqtkey_p.h index 155b625400d..3374b907a44 100644 --- a/src/plugins/platforms/wayland/qwaylandqtkey_p.h +++ b/src/plugins/platforms/wayland/qwaylandqtkey_p.h @@ -80,7 +80,7 @@ private: uint32_t nativeModifiers, const QString &text, uint32_t autorep, - uint32_t count) Q_DECL_OVERRIDE; + uint32_t count) override; }; diff --git a/src/plugins/platforms/wayland/qwaylandscreen_p.h b/src/plugins/platforms/wayland/qwaylandscreen_p.h index f9f0776ffbe..b2900a964f1 100644 --- a/src/plugins/platforms/wayland/qwaylandscreen_p.h +++ b/src/plugins/platforms/wayland/qwaylandscreen_p.h @@ -72,26 +72,26 @@ public: void init(); QWaylandDisplay *display() const; - QRect geometry() const Q_DECL_OVERRIDE; - int depth() const Q_DECL_OVERRIDE; - QImage::Format format() const Q_DECL_OVERRIDE; + QRect geometry() const override; + int depth() const override; + QImage::Format format() const override; - QSizeF physicalSize() const Q_DECL_OVERRIDE; + QSizeF physicalSize() const override; - QDpi logicalDpi() const Q_DECL_OVERRIDE; - QList virtualSiblings() const Q_DECL_OVERRIDE; + QDpi logicalDpi() const override; + QList virtualSiblings() const override; - void setOrientationUpdateMask(Qt::ScreenOrientations mask) Q_DECL_OVERRIDE; + void setOrientationUpdateMask(Qt::ScreenOrientations mask) override; - Qt::ScreenOrientation orientation() const Q_DECL_OVERRIDE; + Qt::ScreenOrientation orientation() const override; int scale() const; - qreal devicePixelRatio() const Q_DECL_OVERRIDE; - qreal refreshRate() const Q_DECL_OVERRIDE; + qreal devicePixelRatio() const override; + qreal refreshRate() const override; - QString name() const Q_DECL_OVERRIDE { return mOutputName; } + QString name() const override { return mOutputName; } #if QT_CONFIG(cursor) - QPlatformCursor *cursor() const Q_DECL_OVERRIDE; + QPlatformCursor *cursor() const override; QWaylandCursor *waylandCursor() const { return mWaylandCursor; }; #endif @@ -101,15 +101,15 @@ public: static QWaylandScreen *waylandScreenFromWindow(QWindow *window); private: - void output_mode(uint32_t flags, int width, int height, int refresh) Q_DECL_OVERRIDE; + void output_mode(uint32_t flags, int width, int height, int refresh) override; void output_geometry(int32_t x, int32_t y, int32_t width, int32_t height, int subpixel, const QString &make, const QString &model, - int32_t transform) Q_DECL_OVERRIDE; - void output_scale(int32_t factor) Q_DECL_OVERRIDE; - void output_done() Q_DECL_OVERRIDE; + int32_t transform) override; + void output_scale(int32_t factor) override; + void output_done() override; int m_outputId; QWaylandDisplay *mWaylandDisplay; diff --git a/src/plugins/platforms/wayland/qwaylandshmbackingstore_p.h b/src/plugins/platforms/wayland/qwaylandshmbackingstore_p.h index a5b809c769f..71f98e30cfe 100644 --- a/src/plugins/platforms/wayland/qwaylandshmbackingstore_p.h +++ b/src/plugins/platforms/wayland/qwaylandshmbackingstore_p.h @@ -72,8 +72,8 @@ public: QWaylandShmBuffer(QWaylandDisplay *display, const QSize &size, QImage::Format format, int scale = 1); ~QWaylandShmBuffer(); - QSize size() const Q_DECL_OVERRIDE { return mImage.size(); } - int scale() const Q_DECL_OVERRIDE { return int(mImage.devicePixelRatio()); } + QSize size() const override { return mImage.size(); } + int scale() const override { return int(mImage.devicePixelRatio()); } QImage *image() { return &mImage; } QImage *imageInsideMargins(const QMargins &margins); @@ -91,11 +91,11 @@ public: ~QWaylandShmBackingStore(); QPaintDevice *paintDevice(); - void flush(QWindow *window, const QRegion ®ion, const QPoint &offset) Q_DECL_OVERRIDE; - void resize(const QSize &size, const QRegion &staticContents) Q_DECL_OVERRIDE; + void flush(QWindow *window, const QRegion ®ion, const QPoint &offset) override; + void resize(const QSize &size, const QRegion &staticContents) override; void resize(const QSize &size); - void beginPaint(const QRegion &) Q_DECL_OVERRIDE; - void endPaint() Q_DECL_OVERRIDE; + void beginPaint(const QRegion &) override; + void endPaint() override; QWaylandAbstractDecoration *windowDecoration() const; @@ -108,7 +108,7 @@ public: void iterateBuffer(); #if QT_CONFIG(opengl) - QImage toImage() const Q_DECL_OVERRIDE; + QImage toImage() const override; #endif private: diff --git a/src/plugins/platforms/wayland/qwaylandshmwindow_p.h b/src/plugins/platforms/wayland/qwaylandshmwindow_p.h index d06b9b00951..af86ce3a342 100644 --- a/src/plugins/platforms/wayland/qwaylandshmwindow_p.h +++ b/src/plugins/platforms/wayland/qwaylandshmwindow_p.h @@ -64,8 +64,8 @@ public: QWaylandShmWindow(QWindow *window); ~QWaylandShmWindow(); - WindowType windowType() const Q_DECL_OVERRIDE; - QSurfaceFormat format() const Q_DECL_OVERRIDE { return QSurfaceFormat(); } + WindowType windowType() const override; + QSurfaceFormat format() const override { return QSurfaceFormat(); } }; } diff --git a/src/plugins/platforms/wayland/qwaylandtouch_p.h b/src/plugins/platforms/wayland/qwaylandtouch_p.h index b17bce6abe7..7d909769d8a 100644 --- a/src/plugins/platforms/wayland/qwaylandtouch_p.h +++ b/src/plugins/platforms/wayland/qwaylandtouch_p.h @@ -88,8 +88,8 @@ private: int32_t velocity_x, int32_t velocity_y, uint32_t flags, - struct wl_array *rawdata) Q_DECL_OVERRIDE; - void touch_extension_configure(uint32_t flags) Q_DECL_OVERRIDE; + struct wl_array *rawdata) override; + void touch_extension_configure(uint32_t flags) override; void sendTouchEvent(); diff --git a/src/plugins/platforms/wayland/qwaylandwindow_p.h b/src/plugins/platforms/wayland/qwaylandwindow_p.h index 7b48e890f05..d5d6e3a315f 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow_p.h +++ b/src/plugins/platforms/wayland/qwaylandwindow_p.h @@ -111,16 +111,16 @@ public: ~QWaylandWindow(); virtual WindowType windowType() const = 0; - WId winId() const Q_DECL_OVERRIDE; - void setVisible(bool visible) Q_DECL_OVERRIDE; - void setParent(const QPlatformWindow *parent) Q_DECL_OVERRIDE; + WId winId() const override; + void setVisible(bool visible) override; + void setParent(const QPlatformWindow *parent) override; - void setWindowTitle(const QString &title) Q_DECL_OVERRIDE; + void setWindowTitle(const QString &title) override; inline QIcon windowIcon() const; - void setWindowIcon(const QIcon &icon) Q_DECL_OVERRIDE; + void setWindowIcon(const QIcon &icon) override; - void setGeometry(const QRect &rect) Q_DECL_OVERRIDE; + void setGeometry(const QRect &rect) override; void configure(uint32_t edges, int32_t width, int32_t height); @@ -136,7 +136,7 @@ public: void waitForFrameSync(); - QMargins frameMargins() const Q_DECL_OVERRIDE; + QMargins frameMargins() const override; static QWaylandWindow *fromWlSurface(::wl_surface *surface); @@ -145,22 +145,22 @@ public: QWaylandSubSurface *subSurfaceWindow() const; QWaylandScreen *screen() const { return mScreen; } - void handleContentOrientationChange(Qt::ScreenOrientation orientation) Q_DECL_OVERRIDE; + void handleContentOrientationChange(Qt::ScreenOrientation orientation) override; void setOrientationMask(Qt::ScreenOrientations mask); - void setWindowState(Qt::WindowState state) Q_DECL_OVERRIDE; - void setWindowFlags(Qt::WindowFlags flags) Q_DECL_OVERRIDE; + void setWindowState(Qt::WindowState state) override; + void setWindowFlags(Qt::WindowFlags flags) override; - void raise() Q_DECL_OVERRIDE; - void lower() Q_DECL_OVERRIDE; + void raise() override; + void lower() override; - void setMask(const QRegion ®ion) Q_DECL_OVERRIDE; + void setMask(const QRegion ®ion) override; int scale() const; - qreal devicePixelRatio() const Q_DECL_OVERRIDE; + qreal devicePixelRatio() const override; - void requestActivateWindow() Q_DECL_OVERRIDE; - bool isExposed() const Q_DECL_OVERRIDE; + void requestActivateWindow() override; + bool isExposed() const override; void unfocus(); QWaylandAbstractDecoration *decoration() const; @@ -187,7 +187,7 @@ public: void doResize(); void setCanResize(bool canResize); - bool setMouseGrabEnabled(bool grab) Q_DECL_OVERRIDE; + bool setMouseGrabEnabled(bool grab) override; static QWaylandWindow *mouseGrab() { return mMouseGrab; } void sendProperty(const QString &name, const QVariant &value); @@ -200,11 +200,11 @@ public: void setBackingStore(QWaylandShmBackingStore *backingStore) { mBackingStore = backingStore; } QWaylandShmBackingStore *backingStore() const { return mBackingStore; } - bool setKeyboardGrabEnabled(bool) Q_DECL_OVERRIDE { return false; } - void propagateSizeHints() Q_DECL_OVERRIDE { } + bool setKeyboardGrabEnabled(bool) override { return false; } + void propagateSizeHints() override { } void addAttachOffset(const QPoint point); - void requestUpdate() Q_DECL_OVERRIDE; + void requestUpdate() override; public slots: void requestResize(); diff --git a/src/plugins/platforms/wayland/qwaylandwindowmanagerintegration_p.h b/src/plugins/platforms/wayland/qwaylandwindowmanagerintegration_p.h index 463b67ef6a8..cf6ca660578 100644 --- a/src/plugins/platforms/wayland/qwaylandwindowmanagerintegration_p.h +++ b/src/plugins/platforms/wayland/qwaylandwindowmanagerintegration_p.h @@ -77,10 +77,10 @@ public: explicit QWaylandWindowManagerIntegration(QWaylandDisplay *waylandDisplay); virtual ~QWaylandWindowManagerIntegration(); - QByteArray desktopEnvironment() const Q_DECL_OVERRIDE; + QByteArray desktopEnvironment() const override; - bool openUrl(const QUrl &url) Q_DECL_OVERRIDE; - bool openDocument(const QUrl &url) Q_DECL_OVERRIDE; + bool openUrl(const QUrl &url) override; + bool openDocument(const QUrl &url) override; bool showIsFullScreen() const; @@ -90,8 +90,8 @@ private: QScopedPointer d_ptr; - void windowmanager_hints(int32_t showIsFullScreen) Q_DECL_OVERRIDE; - void windowmanager_quit() Q_DECL_OVERRIDE; + void windowmanager_hints(int32_t showIsFullScreen) override; + void windowmanager_quit() override; void openUrl_helper(const QUrl &url); }; diff --git a/src/plugins/platforms/wayland/qwaylandwlshellintegration_p.h b/src/plugins/platforms/wayland/qwaylandwlshellintegration_p.h index 9082c7628d1..55b8f89cac9 100644 --- a/src/plugins/platforms/wayland/qwaylandwlshellintegration_p.h +++ b/src/plugins/platforms/wayland/qwaylandwlshellintegration_p.h @@ -58,8 +58,8 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandWlShellIntegration : public QWaylandShellI { public: QWaylandWlShellIntegration(QWaylandDisplay* display); - bool initialize(QWaylandDisplay *) Q_DECL_OVERRIDE; - QWaylandShellSurface *createShellSurface(QWaylandWindow *window) Q_DECL_OVERRIDE; + bool initialize(QWaylandDisplay *) override; + QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override; private: QtWayland::wl_shell *m_wlShell; diff --git a/src/plugins/platforms/wayland/qwaylandwlshellsurface_p.h b/src/plugins/platforms/wayland/qwaylandwlshellsurface_p.h index 89bce55852d..94e3417a412 100644 --- a/src/plugins/platforms/wayland/qwaylandwlshellsurface_p.h +++ b/src/plugins/platforms/wayland/qwaylandwlshellsurface_p.h @@ -78,27 +78,27 @@ public: virtual ~QWaylandWlShellSurface(); using QtWayland::wl_shell_surface::resize; - void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) Q_DECL_OVERRIDE; + void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) override; using QtWayland::wl_shell_surface::move; - void move(QWaylandInputDevice *inputDevice) Q_DECL_OVERRIDE; + void move(QWaylandInputDevice *inputDevice) override; - void setTitle(const QString & title) Q_DECL_OVERRIDE; - void setAppId(const QString &appId) Q_DECL_OVERRIDE; + void setTitle(const QString & title) override; + void setAppId(const QString &appId) override; - void raise() Q_DECL_OVERRIDE; - void lower() Q_DECL_OVERRIDE; - void setContentOrientationMask(Qt::ScreenOrientations orientation) Q_DECL_OVERRIDE; - void setWindowFlags(Qt::WindowFlags flags) Q_DECL_OVERRIDE; - void sendProperty(const QString &name, const QVariant &value) Q_DECL_OVERRIDE; + void raise() override; + void lower() override; + void setContentOrientationMask(Qt::ScreenOrientations orientation) override; + void setWindowFlags(Qt::WindowFlags flags) override; + void sendProperty(const QString &name, const QVariant &value) override; void setType(Qt::WindowType type, QWaylandWindow *transientParent) override; private: - void setMaximized() Q_DECL_OVERRIDE; - void setFullscreen() Q_DECL_OVERRIDE; - void setNormal() Q_DECL_OVERRIDE; - void setMinimized() Q_DECL_OVERRIDE; + void setMaximized() override; + void setFullscreen() override; + void setNormal() override; + void setMinimized() override; void setTopLevel(); void updateTransientParent(QWindow *parent); @@ -110,11 +110,11 @@ private: QSize m_size; QWaylandExtendedSurface *m_extendedWindow; - void shell_surface_ping(uint32_t serial) Q_DECL_OVERRIDE; + void shell_surface_ping(uint32_t serial) override; void shell_surface_configure(uint32_t edges, int32_t width, - int32_t height) Q_DECL_OVERRIDE; - void shell_surface_popup_done() Q_DECL_OVERRIDE; + int32_t height) override; + void shell_surface_popup_done() override; friend class QWaylandWindow; }; diff --git a/src/plugins/platforms/wayland/qwaylandxdgshell_p.h b/src/plugins/platforms/wayland/qwaylandxdgshell_p.h index 97a15e46aee..f462f28281d 100644 --- a/src/plugins/platforms/wayland/qwaylandxdgshell_p.h +++ b/src/plugins/platforms/wayland/qwaylandxdgshell_p.h @@ -82,7 +82,7 @@ public: QWaylandXdgPopup *createXdgPopup(QWaylandWindow *window); private: - void xdg_shell_ping(uint32_t serial) Q_DECL_OVERRIDE; + void xdg_shell_ping(uint32_t serial) override; QVector m_popups; uint m_popupSerial; diff --git a/src/plugins/platforms/wayland/qwaylandxdgshellintegration_p.h b/src/plugins/platforms/wayland/qwaylandxdgshellintegration_p.h index e0e6bda0dc5..e14bf5bd23d 100644 --- a/src/plugins/platforms/wayland/qwaylandxdgshellintegration_p.h +++ b/src/plugins/platforms/wayland/qwaylandxdgshellintegration_p.h @@ -59,9 +59,9 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgShellIntegration : public QWaylandShell { public: QWaylandXdgShellIntegration(QWaylandDisplay *display); - bool initialize(QWaylandDisplay *display) Q_DECL_OVERRIDE; - QWaylandShellSurface *createShellSurface(QWaylandWindow *window) Q_DECL_OVERRIDE; - void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) Q_DECL_OVERRIDE; + bool initialize(QWaylandDisplay *display) override; + QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override; + void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) override; private: QWaylandXdgShell *m_xdgShell; diff --git a/src/plugins/platforms/wayland/qwaylandxdgsurface_p.h b/src/plugins/platforms/wayland/qwaylandxdgsurface_p.h index 184ef13eb1f..00154ade072 100644 --- a/src/plugins/platforms/wayland/qwaylandxdgsurface_p.h +++ b/src/plugins/platforms/wayland/qwaylandxdgsurface_p.h @@ -82,19 +82,19 @@ public: using QtWayland::xdg_surface::resize; void resize(QWaylandInputDevice *inputDevice, enum resize_edge edges); - void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) Q_DECL_OVERRIDE; + void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) override; using QtWayland::xdg_surface::move; - void move(QWaylandInputDevice *inputDevice) Q_DECL_OVERRIDE; + void move(QWaylandInputDevice *inputDevice) override; - void setTitle(const QString &title) Q_DECL_OVERRIDE; - void setAppId(const QString &appId) Q_DECL_OVERRIDE; + void setTitle(const QString &title) override; + void setAppId(const QString &appId) override; - void raise() Q_DECL_OVERRIDE; - void lower() Q_DECL_OVERRIDE; - void setContentOrientationMask(Qt::ScreenOrientations orientation) Q_DECL_OVERRIDE; - void setWindowFlags(Qt::WindowFlags flags) Q_DECL_OVERRIDE; - void sendProperty(const QString &name, const QVariant &value) Q_DECL_OVERRIDE; + void raise() override; + void lower() override; + void setContentOrientationMask(Qt::ScreenOrientations orientation) override; + void setWindowFlags(Qt::WindowFlags flags) override; + void sendProperty(const QString &name, const QVariant &value) override; bool isFullscreen() const { return m_fullscreen; } bool isMaximized() const { return m_maximized; } @@ -102,10 +102,10 @@ public: void setType(Qt::WindowType type, QWaylandWindow *transientParent) override; private: - void setMaximized() Q_DECL_OVERRIDE; - void setFullscreen() Q_DECL_OVERRIDE; - void setNormal() Q_DECL_OVERRIDE; - void setMinimized() Q_DECL_OVERRIDE; + void setMaximized() override; + void setFullscreen() override; + void setNormal() override; + void setMinimized() override; void updateTransientParent(QWaylandWindow *parent); @@ -123,8 +123,8 @@ private: void xdg_surface_configure(int32_t width, int32_t height, struct wl_array *states, - uint32_t serial) Q_DECL_OVERRIDE; - void xdg_surface_close() Q_DECL_OVERRIDE; + uint32_t serial) override; + void xdg_surface_close() override; friend class QWaylandWindow; }; diff --git a/tests/auto/wayland/client/mockinput.h b/tests/auto/wayland/client/mockinput.h index 7e88ffb0fac..9c217b6acd2 100644 --- a/tests/auto/wayland/client/mockinput.h +++ b/tests/auto/wayland/client/mockinput.h @@ -54,10 +54,10 @@ public: Touch *touch() const { return m_touch.data(); } protected: - void seat_bind_resource(Resource *resource) Q_DECL_OVERRIDE; - void seat_get_keyboard(Resource *resource, uint32_t id) Q_DECL_OVERRIDE; - void seat_get_pointer(Resource *resource, uint32_t id) Q_DECL_OVERRIDE; - void seat_get_touch(Resource *resource, uint32_t id) Q_DECL_OVERRIDE; + void seat_bind_resource(Resource *resource) override; + void seat_get_keyboard(Resource *resource, uint32_t id) override; + void seat_get_pointer(Resource *resource, uint32_t id) override; + void seat_get_touch(Resource *resource, uint32_t id) override; private: Compositor *m_compositor; @@ -80,7 +80,7 @@ public: void sendKey(uint32_t key, uint32_t state); protected: - void keyboard_destroy_resource(wl_keyboard::Resource *resource) Q_DECL_OVERRIDE; + void keyboard_destroy_resource(wl_keyboard::Resource *resource) override; private: Compositor *m_compositor; @@ -103,7 +103,7 @@ public: void sendButton(uint32_t button, uint32_t state); protected: - void pointer_destroy_resource(wl_pointer::Resource *resource) Q_DECL_OVERRIDE; + void pointer_destroy_resource(wl_pointer::Resource *resource) override; private: Compositor *m_compositor; @@ -158,7 +158,7 @@ public: DataDevice *dataDevice() const; protected: - void data_device_manager_get_data_device(Resource *resource, uint32_t id, struct ::wl_resource *seat) Q_DECL_OVERRIDE; + void data_device_manager_get_data_device(Resource *resource, uint32_t id, struct ::wl_resource *seat) override; void data_device_manager_create_data_source(Resource *resource, uint32_t id) override; private: diff --git a/tests/auto/wayland/client/mocksurface.h b/tests/auto/wayland/client/mocksurface.h index d04386ac8b4..e34d6596ebf 100644 --- a/tests/auto/wayland/client/mocksurface.h +++ b/tests/auto/wayland/client/mocksurface.h @@ -49,16 +49,16 @@ public: protected: - void surface_destroy_resource(Resource *resource) Q_DECL_OVERRIDE; + void surface_destroy_resource(Resource *resource) override; - void surface_destroy(Resource *resource) Q_DECL_OVERRIDE; + void surface_destroy(Resource *resource) override; void surface_attach(Resource *resource, - struct wl_resource *buffer, int x, int y) Q_DECL_OVERRIDE; + struct wl_resource *buffer, int x, int y) override; void surface_damage(Resource *resource, - int32_t x, int32_t y, int32_t width, int32_t height) Q_DECL_OVERRIDE; + int32_t x, int32_t y, int32_t width, int32_t height) override; void surface_frame(Resource *resource, - uint32_t callback) Q_DECL_OVERRIDE; - void surface_commit(Resource *resource) Q_DECL_OVERRIDE; + uint32_t callback) override; + void surface_commit(Resource *resource) override; private: wl_resource *m_buffer; diff --git a/tests/auto/wayland/client/tst_client.cpp b/tests/auto/wayland/client/tst_client.cpp index 6aad25bb40c..5e0db1a14b7 100644 --- a/tests/auto/wayland/client/tst_client.cpp +++ b/tests/auto/wayland/client/tst_client.cpp @@ -91,7 +91,7 @@ public: ++mouseReleaseEventCount; } - void touchEvent(QTouchEvent *event) Q_DECL_OVERRIDE + void touchEvent(QTouchEvent *event) override { ++touchEventCount; } @@ -269,7 +269,7 @@ public: bool dragStarted; protected: - void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE + void mousePressEvent(QMouseEvent *event) override { if (dragStarted) return;