From 0ceab866c76e0d9eb17bc1f3d42af06c0033560b Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Wed, 16 Nov 2011 12:17:05 +0100 Subject: Allow setting the runtime graphicssystem via QT_DEFAULT_RUNTIME_SYSTEM. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is useful on some SGX boards, where each GL context locks a huge chunk into RAM, but we don't want to set the default runtime system to 'meego' as this requires certain EGL extensions. Merge-request: 2718 Reviewed-by: Samuel Rødal --- src/gui/painting/qgraphicssystem_runtime.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp index 19b29a1..6d3f16e 100644 --- a/src/gui/painting/qgraphicssystem_runtime.cpp +++ b/src/gui/painting/qgraphicssystem_runtime.cpp @@ -330,11 +330,15 @@ QRuntimeGraphicsSystem::QRuntimeGraphicsSystem() { QApplicationPrivate::runtime_graphics_system = true; + if (!qgetenv("QT_DEFAULT_RUNTIME_SYSTEM").isEmpty()) { + m_graphicsSystemName = QString::fromLocal8Bit(qgetenv("QT_DEFAULT_RUNTIME_SYSTEM")); + } else { #ifdef QT_DEFAULT_RUNTIME_SYSTEM - m_graphicsSystemName = QLatin1String(QT_DEFAULT_RUNTIME_SYSTEM); - if (m_graphicsSystemName.isNull()) + m_graphicsSystemName = QLatin1String(QT_DEFAULT_RUNTIME_SYSTEM); + if (m_graphicsSystemName.isNull()) #endif - m_graphicsSystemName = QLatin1String("raster"); + m_graphicsSystemName = QLatin1String("raster"); + } #ifdef Q_OS_SYMBIAN m_windowSurfaceDestroyPolicy = DestroyAfterFirstFlush; -- cgit v0.12