From f1bb9053896549ee74bb7301e7ae5ab28786d155 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 11 Dec 2019 11:34:26 +0100 Subject: Fix unused var in no-opengl builds Change-Id: I9c436f408562faaf74e2301ae93e25a0c4e9b22e Fixes: QTBUG-80692 Reviewed-by: Johan Helsing --- src/quick/scenegraph/qsgrhisupport.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/quick/scenegraph/qsgrhisupport.cpp') diff --git a/src/quick/scenegraph/qsgrhisupport.cpp b/src/quick/scenegraph/qsgrhisupport.cpp index 12c6742342..62806236b6 100644 --- a/src/quick/scenegraph/qsgrhisupport.cpp +++ b/src/quick/scenegraph/qsgrhisupport.cpp @@ -485,6 +485,8 @@ QRhi *QSGRhiSupport::createRhi(QWindow *window, QOffscreenSurface *offscreenSurf rhiParams.window = window; rhi = QRhi::create(backend, &rhiParams, flags); } +#else + Q_UNUSED(offscreenSurface); #endif #if QT_CONFIG(vulkan) if (backend == QRhi::Vulkan) { -- cgit v1.2.3 From 20b3979c14e6437398cf56d2e6878751a5009677 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 11 Dec 2019 14:49:26 +0100 Subject: rhi: Mark window as unused when needed This is a bit more convoluted, but boils down to no-opengl + no-vulkan. Task-number: QTBUG-80692 Change-Id: I508116721ae8ea5013546f20ac89b67929305b52 Reviewed-by: Liang Qi --- src/quick/scenegraph/qsgrhisupport.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/quick/scenegraph/qsgrhisupport.cpp') diff --git a/src/quick/scenegraph/qsgrhisupport.cpp b/src/quick/scenegraph/qsgrhisupport.cpp index 62806236b6..e2945879b1 100644 --- a/src/quick/scenegraph/qsgrhisupport.cpp +++ b/src/quick/scenegraph/qsgrhisupport.cpp @@ -463,6 +463,10 @@ QOffscreenSurface *QSGRhiSupport::maybeCreateOffscreenSurface(QWindow *window) // must be called on the render thread QRhi *QSGRhiSupport::createRhi(QWindow *window, QOffscreenSurface *offscreenSurface) { +#if !QT_CONFIG(opengl) && !QT_CONFIG(vulkan) + Q_UNUSED(window); +#endif + QRhi *rhi = nullptr; QRhi::Flags flags = 0; -- cgit v1.2.3