summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-08-02 08:28:52 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-08-02 17:49:38 +0200
commitfa2a7b256e2229d11b986007276b742d7be79e8f (patch)
treea01302436b0911ba21540c56b26f21d92e86961a /src/client
parent2b799afa3cd79abed746d4ca540dd0349d0cdefc (diff)
QWaylandWindow: adapt to QPlatformWindow::setBackingStore() addition
When qtbase/a4ca9e80658bca7dad1529f03c1b59173a6ecf62 added a virtual QPlatformWindow::setBackingStore(), this was hidden by the existing QWaylandWindow::setBackingStore(), causing a FTBFS on -developer-builds. Fix by using the newly-added detection macro to turn the existing function into an overrider. Pick-to: 6.6 Fixes: QTBUG-115691 Task-number: QTBUG-97482 Change-Id: If1d8c4443fe50030addb23331a50b7b9e1274626 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/client')
-rw-r--r--src/client/qwaylandwindow.cpp7
-rw-r--r--src/client/qwaylandwindow_p.h4
2 files changed, 11 insertions, 0 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 505836296..d7bb6c652 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -1500,6 +1500,13 @@ QVariant QWaylandWindow::property(const QString &name, const QVariant &defaultVa
return m_properties.value(name, defaultValue);
}
+#ifdef QT_PLATFORM_WINDOW_HAS_VIRTUAL_SET_BACKING_STORE
+void QWaylandWindow::setBackingStore(QPlatformBackingStore *store)
+{
+ mBackingStore = dynamic_cast<QWaylandShmBackingStore *>(store);
+}
+#endif
+
void QWaylandWindow::timerEvent(QTimerEvent *event)
{
if (event->timerId() != mFrameCallbackCheckIntervalTimerId)
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index 042ea5660..17140c52e 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -201,7 +201,11 @@ public:
QVariant property(const QString &name);
QVariant property(const QString &name, const QVariant &defaultValue);
+#ifdef QT_PLATFORM_WINDOW_HAS_VIRTUAL_SET_BACKING_STORE
+ void setBackingStore(QPlatformBackingStore *store) override;
+#else
void setBackingStore(QWaylandShmBackingStore *backingStore) { mBackingStore = backingStore; }
+#endif
QWaylandShmBackingStore *backingStore() const { return mBackingStore; }
void setShellIntegration(QWaylandShellIntegration *shellIntegration);