diff options
Diffstat (limited to 'src/gui/itemviews/qfileiconprovider.cpp')
-rw-r--r-- | src/gui/itemviews/qfileiconprovider.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gui/itemviews/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp index 99100f12e2..d9446c7cbd 100644 --- a/src/gui/itemviews/qfileiconprovider.cpp +++ b/src/gui/itemviews/qfileiconprovider.cpp @@ -378,14 +378,16 @@ QIcon QFileIconProviderPrivate::getMacIcon(const QFileInfo &fi) const qt_mac_constructQIconFromIconRef(iconRef, 0, &retIcon); ReleaseIconRef(iconRef); - pixmap = retIcon.pixmap(16); - QPixmapCache::insert(keyBase + QLatin1String("16"), pixmap); - pixmap = retIcon.pixmap(32); - QPixmapCache::insert(keyBase + QLatin1String("32"), pixmap); - pixmap = retIcon.pixmap(64); - QPixmapCache::insert(keyBase + QLatin1String("64"), pixmap); - pixmap = retIcon.pixmap(128); - QPixmapCache::insert(keyBase + QLatin1String("128"), pixmap); + if (fi.isFile() && !fi.isExecutable() && !fi.isSymLink()) { + pixmap = retIcon.pixmap(16); + QPixmapCache::insert(keyBase + QLatin1String("16"), pixmap); + pixmap = retIcon.pixmap(32); + QPixmapCache::insert(keyBase + QLatin1String("32"), pixmap); + pixmap = retIcon.pixmap(64); + QPixmapCache::insert(keyBase + QLatin1String("64"), pixmap); + pixmap = retIcon.pixmap(128); + QPixmapCache::insert(keyBase + QLatin1String("128"), pixmap); + } return retIcon; } |