diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2009-05-20 07:50:47 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2009-05-22 09:55:57 (GMT) |
commit | 87911c6c97b11bd7d10a38698460174b6cadfbe8 (patch) | |
tree | d24a9bd7807e832370767873c1538444257254d1 /src/gui/graphicsview/qgraphicsscene.cpp | |
parent | 6b7736e5cc352f1326989eee8dd9ef87f2b9a486 (diff) | |
download | Qt-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
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 5 |
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) { |