summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-06-23 11:09:55 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-06-29 07:57:49 +0000
commit6015db674f8ef8321bbb030b52d294686caf5bc7 (patch)
tree7c8525c23400f3113f38a2f6ec263b1dd5bd6733 /src/core/web_engine_context.cpp
parent3fb34fe46daa2ff8dfdc1b7fd65c1ca3d7b6cfaf (diff)
Fix usingQtQuick2DRenderer
The software backend device was renamed "software", the environment variable "QT_QUICK_BACKEND", and we need to disable OpenGL for any none default QtQuick backend. Change-Id: If59475002fe43f78dcda0ead2508d1285f923a4a Reviewed-by: Andy Nichols <andy.nichols@qt.io> 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.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index c3d12a5ce..43dc943e7 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -146,10 +146,14 @@ bool usingQtQuick2DRenderer()
}
if (device.isEmpty())
+ device = QString::fromLocal8Bit(qgetenv("QT_QUICK_BACKEND"));
+ if (device.isEmpty())
device = QString::fromLocal8Bit(qgetenv("QMLSCENE_DEVICE"));
+ if (device.isEmpty())
+ device = QLatin1String("default");
- // This assumes that the plugin is installed and is going to be used by QtQuick.
- return device == QLatin1String("softwarecontext");
+ // Anything other than the default OpenGL device will need to render in 2D mode.
+ return device != QLatin1String("default");
}
#if defined(ENABLE_PLUGINS)