summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-08-02 08:28:52 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-08-02 17:13:30 +0000
commit8a02a35848bd1cb803bbe209245329270e2b44e3 (patch)
treee45663a6c5914d944fbcdff0c2a30bd950fc0c98
parent66fa2eabeaf91584a79d34057e083d74525c6138 (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. 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> (cherry picked from commit fa2a7b256e2229d11b986007276b742d7be79e8f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-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);