diff options
author | Michael BrĂ¼ning <michael.bruning@qt.io> | 2017-04-26 11:43:22 +0200 |
---|---|---|
committer | Michael BrĂ¼ning <michael.bruning@qt.io> | 2017-05-02 07:20:32 +0000 |
commit | b53896d1e7f3cad971edd56f303a32058cefde48 (patch) | |
tree | d09fa462ef7a8e6524400f5b8ad624b77f07683f /src/core/web_engine_context.cpp | |
parent | 9df14dff86fcc2daa0d9342174dba62ec32169bc (diff) |
Detect the scenegraph software backend when it was set programatically
Since 5.8, it is possible to set the Qt Quick scenegraph backend using
QQuickWindow::setSceneGraph backend. However, this is not detectable by
WebEngine's implementation as it relied on environment variables or
command line options being specified.
Task-number: QTBUG-60232
Change-Id: I53291510887ec5c75a15d5927a84e91fb5859e26
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r-- | src/core/web_engine_context.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 81f968d11..60622b4ae 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -91,6 +91,7 @@ #ifndef QT_NO_OPENGL # include <QOpenGLContext> #endif +#include <QQuickWindow> #include <QStringList> #include <QSurfaceFormat> #include <QVector> @@ -158,6 +159,8 @@ bool usingQtQuick2DRenderer() } if (device.isEmpty()) + device = QQuickWindow::sceneGraphBackend(); + if (device.isEmpty()) device = QString::fromLocal8Bit(qgetenv("QT_QUICK_BACKEND")); if (device.isEmpty()) device = QString::fromLocal8Bit(qgetenv("QMLSCENE_DEVICE")); |