diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-08-26 11:37:18 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-08-26 11:37:18 (GMT) |
commit | 55123a9b94eb38a372a2d285b25c58085921f233 (patch) | |
tree | a50e58817060bd31116e4cee684300eaf721ce4f /src/gui/image | |
parent | c0c2e556e98ffe550cbedb4e3a0def5dd272ce25 (diff) | |
parent | a4515ec14fdc772eb6b5c4801cddaddc26b94d84 (diff) | |
download | Qt-55123a9b94eb38a372a2d285b25c58085921f233.zip Qt-55123a9b94eb38a372a2d285b25c58085921f233.tar.gz Qt-55123a9b94eb38a372a2d285b25c58085921f233.tar.bz2 |
Merge remote branch 'qt/master' into lighthouse-master
Conflicts:
src/opengl/opengl.pro
src/opengl/qgl.cpp
src/opengl/qgl_p.h
Diffstat (limited to 'src/gui/image')
-rw-r--r-- | src/gui/image/qpixmap.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 50be2a3..dc38a0a 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -830,15 +830,17 @@ bool QPixmap::load(const QString &fileName, const char *format, Qt::ImageConvers return false; QFileInfo info(fileName); - if (!info.exists()) - return false; - QString key = QLatin1Literal("qt_pixmap") % info.absoluteFilePath() % HexString<uint>(info.lastModified().toTime_t()) % HexString<quint64>(info.size()) % HexString<uint>(data ? data->pixelType() : QPixmapData::PixmapType); + // Note: If no extension is provided, we try to match the + // file against known plugin extensions + if (!info.completeSuffix().isEmpty() && !info.exists()) + return false; + if (QPixmapCache::find(key, *this)) return true; |