From 40bb2d29b92c28c662a94b77a8170567aba087ab Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 27 Jul 2016 11:57:46 +0200 Subject: Add QPlatformTheme::fileIcon() Add a way to return an icon instead of a pixmap of a specific size for a file for usage by QFileIconProvider, etc. Fall back to fileIconPixmap() if fileIcon() returns a null icon. This allows for supporting XDG theme icons and Qt Quick applications accessing file icons. Change-Id: I9ffbd6602e1a6a490c0046d950636447c5127474 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/gui/kernel/qplatformtheme.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/kernel/qplatformtheme.h') diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h index b16fdd7939..c04ebd2190 100644 --- a/src/gui/kernel/qplatformtheme.h +++ b/src/gui/kernel/qplatformtheme.h @@ -55,6 +55,7 @@ QT_BEGIN_NAMESPACE +class QIcon; class QIconEngine; class QMenu; class QMenuBar; @@ -301,6 +302,8 @@ public: virtual QVariant themeHint(ThemeHint hint) const; virtual QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const; + virtual QIcon fileIcon(const QFileInfo &fileInfo, + QPlatformTheme::IconOptions iconOptions = 0) const; virtual QPixmap fileIconPixmap(const QFileInfo &fileInfo, const QSizeF &size, QPlatformTheme::IconOptions iconOptions = 0) const; -- cgit v1.2.3