Changeset 1118 for trunk/src/gui


Ignore:
Timestamp:
Mar 5, 2013, 11:42:11 PM (12 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Use canonical path in default file icon provider to pick up proper icons for symlinks.

This would return an icon for a symlink file itself which is usually not what symlink points to.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/itemviews/qfileiconprovider.cpp

    r846 r1118  
    348348    }
    349349
    350     QByteArray path = QDir::toNativeSeparators(
    351         QDir::cleanPath(fileInfo.absoluteFilePath())).toLocal8Bit();
     350    QByteArray path = QFile::encodeName(QDir::toNativeSeparators(
     351        QDir::cleanPath(fileInfo.canonicalFilePath())));
    352352    HPOINTER hicon = WinLoadFileIcon(path, FALSE);
    353353    if (hicon == NULLHANDLE) {
Note: See TracChangeset for help on using the changeset viewer.