OSDN Git Service

apply upstream commit
authorIvailo Monev <xakepa10@laimg.moc>
Tue, 25 Jun 2019 20:59:32 +0000 (20:59 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Tue, 25 Jun 2019 20:59:32 +0000 (20:59 +0000)
upstream commit:
https://github.com/qt/qtbase/commit/909e6a009c968042f5295358737c9d2d84fcc0ba

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/gui/graphicsview/qgraphicsitem.cpp

index d8b6e81..d506a18 100644 (file)
@@ -1359,11 +1359,8 @@ void QGraphicsItemCache::purge()
 {
     QPixmapCache::remove(key);
     key = QPixmapCache::Key();
-    QMutableMapIterator<QPaintDevice *, DeviceData> it(deviceData);
-    while (it.hasNext()) {
-        DeviceData &data = it.next().value();
+    foreach (const DeviceData &data, deviceData) {
         QPixmapCache::remove(data.key);
-        data.cacheIndent = QPoint();
     }
     deviceData.clear();
     allExposed = true;