From 6015db674f8ef8321bbb030b52d294686caf5bc7 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 23 Jun 2016 11:09:55 +0200 Subject: 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 Reviewed-by: Kai Koehne --- src/core/web_engine_context.cpp | 8 ++++++-- 1 file 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 @@ -145,11 +145,15 @@ 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) -- cgit v1.2.3