From b595c2fbe0fa354190b713ef09dd1f348e22e2b6 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Fri, 21 Jan 2011 12:55:23 +0100 Subject: Set the graphics system name in the graphics system factory. This allows us to know which graphics system is in use at runtime. Reviewed-by: Jani Hautakangas --- src/gui/painting/qgraphicssystem_runtime.cpp | 1 - src/gui/painting/qgraphicssystemfactory.cpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp index a9fbbee..bd27e9d 100644 --- a/src/gui/painting/qgraphicssystem_runtime.cpp +++ b/src/gui/painting/qgraphicssystem_runtime.cpp @@ -322,7 +322,6 @@ QRuntimeGraphicsSystem::QRuntimeGraphicsSystem() : m_windowSurfaceDestroyPolicy(DestroyImmediately), m_graphicsSystem(0) { - QApplicationPrivate::graphics_system_name = QLatin1String("runtime"); QApplicationPrivate::runtime_graphics_system = true; #ifdef QT_DEFAULT_RUNTIME_SYSTEM diff --git a/src/gui/painting/qgraphicssystemfactory.cpp b/src/gui/painting/qgraphicssystemfactory.cpp index 3adeba4..1416f7c 100644 --- a/src/gui/painting/qgraphicssystemfactory.cpp +++ b/src/gui/painting/qgraphicssystemfactory.cpp @@ -45,6 +45,7 @@ #include "qmutex.h" #include "qapplication.h" +#include #include "qgraphicssystem_raster_p.h" #include "qgraphicssystem_runtime_p.h" #include "qdebug.h" @@ -79,6 +80,7 @@ QGraphicsSystem *QGraphicsSystemFactory::create(const QString& key) } #endif + QApplicationPrivate::graphics_system_name = system; if (system == QLatin1String("raster")) return new QRasterGraphicsSystem; else if (system == QLatin1String("runtime")) -- cgit v0.12