summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qfileiconprovider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemviews/qfileiconprovider.cpp')
-rw-r--r--src/gui/itemviews/qfileiconprovider.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/itemviews/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp
index 4abdef9..c78a49b 100644
--- a/src/gui/itemviews/qfileiconprovider.cpp
+++ b/src/gui/itemviews/qfileiconprovider.cpp
@@ -54,6 +54,12 @@
#elif defined(Q_WS_MAC)
#include <private/qt_cocoa_helpers_mac_p.h>
#endif
+
+#if defined(Q_WS_X11) && !defined(Q_NO_STYLE_GTK)
+#include <private/qt_x11_p.h>
+#include <private/gtksymbols_p.h>
+#endif
+
#include <private/qfunctions_p.h>
#ifndef SHGFI_ADDOVERLAYS
@@ -378,6 +384,15 @@ QIcon QFileIconProviderPrivate::getMacIcon(const QFileInfo &fi) const
QIcon QFileIconProvider::icon(const QFileInfo &info) const
{
Q_D(const QFileIconProvider);
+
+#if defined(Q_WS_X11) && !defined(QT_NO_STYLE_GTK)
+ if (X11->desktopEnvironment == DE_GNOME) {
+ QIcon gtkIcon = QGtk::getFilesystemIcon(info);
+ if (!gtkIcon.isNull())
+ return gtkIcon;
+ }
+#endif
+
#ifdef Q_WS_MAC
QIcon retIcon = d->getMacIcon(info);
if (!retIcon.isNull())