summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qicon.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2015-09-08 17:22:01 +0200
committerOlivier Goffart (Woboq GmbH) <ogoffart@woboq.com>2015-09-13 16:23:24 +0000
commite68d06714fa29f986d0fc7de324b79ea94493dfc (patch)
treedf80f8903542067ffe56dc553333495315ae7629 /src/gui/image/qicon.cpp
parent39a472430fb60b5020c94242f6bc071172772e01 (diff)
QIconLoader: Use the GTK+ icon caches
Loading icons is quite slow because we need to stat many files in many directories. That's why gtk adds a cache in the icon theme directory so it avoids stating lots of files. The cache file can be generated with gtk-update-icon-cache utility on a theme directory. If the cache is not present, corrupted, or outdated, the normal slow lookup is still run. [ChangeLog][QtGui][QIcon] fromTheme gained the ability to use the GTK icon cache to speed up lookups. Change-Id: I3ab8a9910be67a34034556023be61a86789a7893 Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/gui/image/qicon.cpp')
-rw-r--r--src/gui/image/qicon.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index ee41efc3e7..7ae081adfb 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -1162,6 +1162,10 @@ QString QIcon::themeName()
compliant theme in one of your themeSearchPaths() and set the
appropriate themeName().
+ \note Qt will make use of GTK's icon-theme.cache if present to speed up
+ the lookup. These caches can be generated using gtk-update-icon-cache:
+ \l{https://developer.gnome.org/gtk3/stable/gtk-update-icon-cache.html}.
+
\sa themeName(), setThemeName(), themeSearchPaths()
*/
QIcon QIcon::fromTheme(const QString &name)