summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorA-Team <ateam@pad.test.qt.nokia.com>2010-09-11 22:00:09 (GMT)
committerA-Team <ateam@pad.test.qt.nokia.com>2010-09-11 22:00:09 (GMT)
commit0e4083ba5bf1bbc581d072b016fb977fb1f846c1 (patch)
tree8748e34bda5bf393067ad9ee96999f9b7f7e0181 /src
parentfd570dca1319cd92daf0f73b10ea4e090ea15c23 (diff)
parent2b527006a3e9147a447a08d78004e20a7ac3d17c (diff)
downloadQt-0e4083ba5bf1bbc581d072b016fb977fb1f846c1.zip
Qt-0e4083ba5bf1bbc581d072b016fb977fb1f846c1.tar.gz
Qt-0e4083ba5bf1bbc581d072b016fb977fb1f846c1.tar.bz2
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qapplication.cpp2
-rw-r--r--src/gui/painting/qgraphicssystem_runtime.cpp6
-rw-r--r--src/openvg/qvgimagepool.cpp13
3 files changed, 16 insertions, 5 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index e99f6ca..d6fb630 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -1140,6 +1140,8 @@ QApplication::~QApplication()
QApplicationPrivate::app_style = 0;
delete QApplicationPrivate::app_icon;
QApplicationPrivate::app_icon = 0;
+ delete QApplicationPrivate::graphics_system;
+ QApplicationPrivate::graphics_system = 0;
#ifndef QT_NO_CURSOR
d->cursor_list.clear();
#endif
diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp
index 2828e9d..a9fbbee 100644
--- a/src/gui/painting/qgraphicssystem_runtime.cpp
+++ b/src/gui/painting/qgraphicssystem_runtime.cpp
@@ -94,7 +94,8 @@ QRuntimePixmapData::QRuntimePixmapData(const QRuntimeGraphicsSystem *gs, PixelTy
QRuntimePixmapData::~QRuntimePixmapData()
{
- m_graphicsSystem->removePixmapData(this);
+ if (QApplicationPrivate::graphics_system)
+ m_graphicsSystem->removePixmapData(this);
delete m_data;
}
@@ -258,7 +259,8 @@ QRuntimeWindowSurface::QRuntimeWindowSurface(const QRuntimeGraphicsSystem *gs, Q
QRuntimeWindowSurface::~QRuntimeWindowSurface()
{
- m_graphicsSystem->removeWindowSurface(this);
+ if (QApplicationPrivate::graphics_system)
+ m_graphicsSystem->removeWindowSurface(this);
}
QPaintDevice *QRuntimeWindowSurface::paintDevice()
diff --git a/src/openvg/qvgimagepool.cpp b/src/openvg/qvgimagepool.cpp
index 78277aa..0c236ea 100644
--- a/src/openvg/qvgimagepool.cpp
+++ b/src/openvg/qvgimagepool.cpp
@@ -154,16 +154,23 @@ bool QVGImagePool::reclaimSpace(VGImageFormat format,
Q_UNUSED(width);
Q_UNUSED(height);
- if (data)
+ bool succeeded = false;
+ bool wasInLRU = false;
+ if (data) {
+ wasInLRU = data->inLRU;
moveToHeadOfLRU(data);
+ }
QVGPixmapData *lrudata = pixmapLRU();
if (lrudata && lrudata != data) {
lrudata->reclaimImages();
- return true;
+ succeeded = true;
}
- return false;
+ if (data && !wasInLRU)
+ removeFromLRU(data);
+
+ return succeeded;
}
void QVGImagePool::hibernate()