diff options
author | Axel Spoerl <axel.spoerl@qt.io> | 2023-07-16 11:16:40 +0200 |
---|---|---|
committer | Axel Spoerl <axel.spoerl@qt.io> | 2023-07-16 20:28:06 +0200 |
commit | 959a8b3967ac3b6315f5b458628ec5661dfc367e (patch) | |
tree | 73a9557bbc7be86743e42d39a42fe03f56407b63 /src/plugins/platforms/eglfs | |
parent | ecab68989e623737f7f930d7b123471ccffbfb95 (diff) |
Adapt setBackingStore() overrides in QWasmWindow and QEglFSWindow
This is a follow up to a4ca9e80658bca7dad1529f03c1b59173a6ecf62,
adapting the backing store setters to become proper overrides of
the newly implemented QPlatformWindow::setBackingStore();
Pick-to: 6.6
Change-Id: Id4f5ff8650ca4e4d3cab1d71d27041c6129bf4ea
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/plugins/platforms/eglfs')
-rw-r--r-- | src/plugins/platforms/eglfs/api/qeglfswindow.cpp | 6 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/api/qeglfswindow_p.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/platforms/eglfs/api/qeglfswindow.cpp b/src/plugins/platforms/eglfs/api/qeglfswindow.cpp index 1a31f97d7b..6210ef16a8 100644 --- a/src/plugins/platforms/eglfs/api/qeglfswindow.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfswindow.cpp @@ -108,8 +108,12 @@ void QEglFSWindow::create() #endif } -void QEglFSWindow::setBackingStore(QOpenGLCompositorBackingStore *backingStore) +void QEglFSWindow::setBackingStore(QPlatformBackingStore *store) { + Q_ASSERT(store); + Q_ASSERT_X(dynamic_cast<QOpenGLCompositorBackingStore *>(store), __FUNCTION__, + "Argument is not a QOpenGLCompositorBackingStore."); + auto *backingStore = static_cast<QOpenGLCompositorBackingStore *>(store); #ifndef QT_NO_OPENGL if (!m_rasterCompositingContext) { m_rasterCompositingContext = new QOpenGLContext; diff --git a/src/plugins/platforms/eglfs/api/qeglfswindow_p.h b/src/plugins/platforms/eglfs/api/qeglfswindow_p.h index d111042040..d8e0a4a735 100644 --- a/src/plugins/platforms/eglfs/api/qeglfswindow_p.h +++ b/src/plugins/platforms/eglfs/api/qeglfswindow_p.h @@ -71,7 +71,7 @@ public: #ifndef QT_NO_OPENGL QOpenGLCompositorBackingStore *backingStore() { return m_backingStore; } - void setBackingStore(QOpenGLCompositorBackingStore *backingStore); + void setBackingStore(QPlatformBackingStore *backingStore) override; QWindow *sourceWindow() const override; const QPlatformTextureList *textures() const override; void endCompositing() override; |