summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@collabora.com>2011-11-16 11:17:05 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-11-16 11:17:05 (GMT)
commit0ceab866c76e0d9eb17bc1f3d42af06c0033560b (patch)
tree30620561b6cde57c4236ffd5de78ca51334f71ea /src
parenta7c77bd46ef85bae624e829cb2a02110ec60b318 (diff)
downloadQt-0ceab866c76e0d9eb17bc1f3d42af06c0033560b.zip
Qt-0ceab866c76e0d9eb17bc1f3d42af06c0033560b.tar.gz
Qt-0ceab866c76e0d9eb17bc1f3d42af06c0033560b.tar.bz2
Allow setting the runtime graphicssystem via QT_DEFAULT_RUNTIME_SYSTEM.
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 <samuel.rodal@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qgraphicssystem_runtime.cpp10
1 files 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;