summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmapcache.cpp
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-05-26 13:26:14 +0200
committerAlexis Menard <alexis.menard@nokia.com>2009-05-26 13:27:32 +0200
commitf552dc200d857505df500b3ce0b99d5f7c74c951 (patch)
tree497cfe224bcf495c6d10c09592dca675a2d12fd6 /src/gui/image/qpixmapcache.cpp
parentc666b88abcb2c5c120054ac3b0d304cd8225ded7 (diff)
We first remove the pixmap from the cache and then release the key
If we don't remove the pixmap from QCache first then the key is invalid and the removal failed Reviewed-by: sroedal
Diffstat (limited to 'src/gui/image/qpixmapcache.cpp')
-rw-r--r--src/gui/image/qpixmapcache.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 3cfc191a09..82b42b4611 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -342,8 +342,10 @@ bool QPMCache::remove(const QString &key)
bool QPMCache::remove(const QPixmapCache::Key &key)
{
+ bool result = QCache<QPixmapCache::Key, QDetachedPixmap>::remove(key);
+ //We release the key after we removed it from the cache
releaseKey(key);
- return QCache<QPixmapCache::Key, QDetachedPixmap>::remove(key);
+ return result;
}
void QPMCache::resizeKeyArray(int size)