equal
deleted
inserted
replaced
828 { |
828 { |
829 if (fileName.isEmpty()) |
829 if (fileName.isEmpty()) |
830 return false; |
830 return false; |
831 |
831 |
832 QFileInfo info(fileName); |
832 QFileInfo info(fileName); |
833 if (!info.exists()) |
|
834 return false; |
|
835 |
|
836 QString key = QLatin1Literal("qt_pixmap") |
833 QString key = QLatin1Literal("qt_pixmap") |
837 % info.absoluteFilePath() |
834 % info.absoluteFilePath() |
838 % HexString<uint>(info.lastModified().toTime_t()) |
835 % HexString<uint>(info.lastModified().toTime_t()) |
839 % HexString<quint64>(info.size()) |
836 % HexString<quint64>(info.size()) |
840 % HexString<uint>(data ? data->pixelType() : QPixmapData::PixmapType); |
837 % HexString<uint>(data ? data->pixelType() : QPixmapData::PixmapType); |
|
838 |
|
839 // Note: If no extension is provided, we try to match the |
|
840 // file against known plugin extensions |
|
841 if (!info.completeSuffix().isEmpty() && !info.exists()) |
|
842 return false; |
841 |
843 |
842 if (QPixmapCache::find(key, *this)) |
844 if (QPixmapCache::find(key, *this)) |
843 return true; |
845 return true; |
844 |
846 |
845 QScopedPointer<QPixmapData> tmp(QPixmapData::create(0, 0, data ? data->type : QPixmapData::PixmapType)); |
847 QScopedPointer<QPixmapData> tmp(QPixmapData::create(0, 0, data ? data->type : QPixmapData::PixmapType)); |