Commit 101f4d3f authored by Robert Loehning's avatar Robert Loehning
Browse files

FileIconProvider calling itself instead of a second object.

Reviewed-by: Friedemann Kleint
parent 1dc99e8f
......@@ -90,7 +90,6 @@ struct FileIconProviderPrivate {
// Mapping of file suffix to icon.
StringIconPairList m_cache;
QFileIconProvider m_systemIconProvider;
QIcon m_unknownFileIcon;
// singleton pattern
......@@ -140,23 +139,23 @@ QIcon FileIconProvider::icon(const QFileInfo &fileInfo) const
// Get icon from OS.
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
return d->m_systemIconProvider.icon(fileInfo);
return QFileIconProvider::icon(fileInfo);
// File icons are unknown on linux systems.
return (fileInfo.isDir()) ?
d->m_systemIconProvider.icon(fileInfo) :
QFileIconProvider::icon(fileInfo) :
QIcon FileIconProvider::icon(IconType type) const
return d->m_systemIconProvider.icon(type);
return QFileIconProvider::icon(type);
QString FileIconProvider::type(const QFileInfo &info) const
return d->m_systemIconProvider.type(info);
return QFileIconProvider::type(info);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment