diff options
author | Michael Dominic K <mdk@codethink.co.uk> | 2010-08-12 13:32:23 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2010-08-12 13:33:41 (GMT) |
commit | 2efd51c2808874c9217cdaea905754ae72d4e443 (patch) | |
tree | 830af1c770ef6cc46833a9bb0d823c519c0378db /src | |
parent | c622cb1c9c11ef6b51f1e2da61f94b83650f6703 (diff) | |
download | Qt-2efd51c2808874c9217cdaea905754ae72d4e443.zip Qt-2efd51c2808874c9217cdaea905754ae72d4e443.tar.gz Qt-2efd51c2808874c9217cdaea905754ae72d4e443.tar.bz2 |
Destroy the old runtime system only when existing pixmaps were migrated.
Merge-request: 2448
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qgraphicssystem_runtime.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp index e1e0ad0..2828e9d 100644 --- a/src/gui/painting/qgraphicssystem_runtime.cpp +++ b/src/gui/painting/qgraphicssystem_runtime.cpp @@ -366,7 +366,7 @@ void QRuntimeGraphicsSystem::setGraphicsSystem(const QString &name) #ifdef QT_DEBUG qDebug() << "QRuntimeGraphicsSystem::setGraphicsSystem( " << name << " )"; #endif - delete m_graphicsSystem; + QGraphicsSystem *oldSystem = m_graphicsSystem; m_graphicsSystem = QGraphicsSystemFactory::create(name); m_graphicsSystemName = name; @@ -393,6 +393,8 @@ void QRuntimeGraphicsSystem::setGraphicsSystem(const QString &name) proxy->m_windowSurface.reset(m_graphicsSystem->createWindowSurface(widget)); qt_widget_private(widget)->invalidateBuffer(widget->rect()); } + + delete oldSystem; } void QRuntimeGraphicsSystem::removePixmapData(QRuntimePixmapData *pixmapData) const |