aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickwidgets
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2020-06-01 15:44:10 +0300
committerSamuli Piippo <samuli.piippo@qt.io>2020-06-02 12:15:51 +0300
commit768b0f2adefffced84aadd4f44b07e8dedbb8f72 (patch)
tree0992fd08750119529f177f545773bfbbd47763b0 /src/quickwidgets
parent2ca7f113588666c936ab7b5f818b6de6932f24bf (diff)
Fix build without opengl
ifdef code that is not available without opengl. Change-Id: I200e95e4bcf1ee361e84819454eade0bbcbd6669 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/quickwidgets')
-rw-r--r--src/quickwidgets/qquickwidget.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp
index 2fccc7208d..0964d6492e 100644
--- a/src/quickwidgets/qquickwidget.cpp
+++ b/src/quickwidgets/qquickwidget.cpp
@@ -378,11 +378,12 @@ void QQuickWidgetPrivate::renderSceneGraph()
return;
if (!useSoftwareRenderer) {
+#if QT_CONFIG(opengl)
if (!context) {
qWarning("QQuickWidget: Attempted to render scene with no context");
return;
}
-
+#endif
Q_ASSERT(offscreenSurface);
}
@@ -417,7 +418,11 @@ QImage QQuickWidgetPrivate::grabFramebuffer()
// prefer the FBO's toImage() if available. When the software renderer
// is in use, however, there will be no FBO and we fall back to grabWindow()
// instead.
- return fbo != nullptr ? fbo->toImage() : offscreenWindow->grabWindow();
+ return
+#if QT_CONFIG(opengl)
+ fbo != nullptr ? fbo->toImage() :
+#endif
+ offscreenWindow->grabWindow();
}
// Intentionally not overriding the QQuickWindow's focusObject.