diff options
author | Samuel Rødal <samuel.rodal@digia.com> | 2013-02-12 12:58:08 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-12 15:21:57 +0100 |
commit | 62d25e4d4f02a53da25b9f14cc9e0244d6655312 (patch) | |
tree | b418fe83622504a33f9423136db30e20733cba92 /src | |
parent | f5acd545a8bf8b187be6b3dd29f095b1fa7e94ea (diff) |
Fixed QPixmapCache associating path with wrong QPixmap.
QPixmap::load() would not detach, so multiple paths could get associated
with the same QPixmap, causing the wrong pixmap to be shown.
Task-number: QTBUG-29639
Change-Id: I064dd6a9611b5996853bec9fb20b6224a0adcf62
Reviewed-by: aavit <eirik.aavitsland@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/image/qpixmap.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 852025117b..b6a21f588e 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -760,6 +760,8 @@ bool QPixmap::load(const QString &fileName, const char *format, Qt::ImageConvers return false; } + detach(); + QFileInfo info(fileName); QString key = QLatin1String("qt_pixmap") % info.absoluteFilePath() |