summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-05-20 07:50:47 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-05-22 09:55:57 (GMT)
commit87911c6c97b11bd7d10a38698460174b6cadfbe8 (patch)
treed24a9bd7807e832370767873c1538444257254d1
parent6b7736e5cc352f1326989eee8dd9ef87f2b9a486 (diff)
downloadQt-87911c6c97b11bd7d10a38698460174b6cadfbe8.zip
Qt-87911c6c97b11bd7d10a38698460174b6cadfbe8.tar.gz
Qt-87911c6c97b11bd7d10a38698460174b6cadfbe8.tar.bz2
Fix a leak because of an old legacy of QPixmapCache string API
We have to replace the pixmap in the cache if it was previously there, we don't need to insert a new pixmap if a full update has been triggered. Reviewed-by:mbm
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 1fbda85..126ea5b 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -4759,10 +4759,7 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
}
// Find pixmap in cache.
- if (!itemCache->allExposed)
- pixmapFound = QPixmapCache::find(pixmapKey, &pix);
- else
- pixmapFound = false;
+ pixmapFound = QPixmapCache::find(pixmapKey, &pix);
// Render using item coordinate cache mode.
if (cacheMode == QGraphicsItem::ItemCoordinateCache) {