From 87911c6c97b11bd7d10a38698460174b6cadfbe8 Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Wed, 20 May 2009 09:50:47 +0200 Subject: 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 --- src/gui/graphicsview/qgraphicsscene.cpp | 5 +---- 1 file changed, 1 insertion(+), 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) { -- cgit v0.12