diff options
author | Markos Chandras <hwoarang@gentoo.org> | 2009-05-23 12:36:41 +0000 |
---|---|---|
committer | Markos Chandras <hwoarang@gentoo.org> | 2009-05-23 12:36:41 +0000 |
commit | 0f56be9255da3ba3590f9996260db969370ea25a (patch) | |
tree | 1f7066c02fc4e06ac5f152b6e9477b126d66e7d4 /x11-libs/qt-gui/files | |
parent | amd64/x86 stable, bug #267212 (diff) | |
download | historical-0f56be9255da3ba3590f9996260db969370ea25a.tar.gz historical-0f56be9255da3ba3590f9996260db969370ea25a.tar.bz2 historical-0f56be9255da3ba3590f9996260db969370ea25a.zip |
Revbump qt-gui with a patch for qpixmap memory leak
Package-Manager: portage-2.2_rc33/cvs/Linux x86_64
Diffstat (limited to 'x11-libs/qt-gui/files')
-rw-r--r-- | x11-libs/qt-gui/files/qt-gui-4.5.1-0282-fix-qpixmapcache-leak.diff | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/x11-libs/qt-gui/files/qt-gui-4.5.1-0282-fix-qpixmapcache-leak.diff b/x11-libs/qt-gui/files/qt-gui-4.5.1-0282-fix-qpixmapcache-leak.diff new file mode 100644 index 000000000000..7de6c9d7a1a0 --- /dev/null +++ b/x11-libs/qt-gui/files/qt-gui-4.5.1-0282-fix-qpixmapcache-leak.diff @@ -0,0 +1,25 @@ +qt-bugs@ issue : none +Qt Software task ID : none +bugs.kde.org number : 183191 +applied: yes +author: Alexis Menard <alexis.menard@nokia.com> + +Make sure that QPixmapCache release the old pixmap if +you reinsert a QPixmap with the same key. + +This patch is already in 4.5 branch. + +--- src/gui/image/qpixmapcache.cpp ++++ src/gui/image/qpixmapcache.cpp +@@ -187,6 +187,11 @@ bool QPMCache::insert(const QString& key, const QPixmap &pixmap, int cost) + cacheKeys.insert(key, cacheKey); + return true; + } ++ qint64 oldCacheKey = cacheKeys.value(key, -1); ++ //If for the same key we add already a pixmap we should delete it ++ if (oldCacheKey != -1) ++ QCache<qint64, QDetachedPixmap>::remove(oldCacheKey); ++ + bool success = QCache<qint64, QDetachedPixmap>::insert(cacheKey, new QDetachedPixmap(pixmap), cost); + if (success) { + cacheKeys.insert(key, cacheKey); |