path: root/src/gui/image/qicon.h
diff options
authorOlivier Goffart <>2015-09-07 15:10:03 +0200
committerOlivier Goffart (Woboq GmbH) <>2015-09-11 12:42:20 +0000
commitd3a21a18de73b70d0f20a36ae36439eac1f17ce4 (patch)
tree9b75c1cd1021d01880377cd399c6f5356ee87cbc /src/gui/image/qicon.h
parent1464118b67a030d290eb14e7c6612202273e1366 (diff)
QIcon: add a new overload of QIcon that does not call availableSizes
This is done so icons from QIcon::fromTheme are loaded lazily and we do not pay for looking up icons that are never used [ChangeLog][QtGui][QIcon] Split fromTheme() in two different overload, one of which would only lazily lookup the icons, in order to speed up startup of applications that initialize many icons that are not necessarily visible. Change-Id: I2ba3aa3a0eae6c8f1ff041a0f5bbb10ad32e3991 Reviewed-by: Volker Krause <> Reviewed-by: David Faure <>
Diffstat (limited to 'src/gui/image/qicon.h')
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/image/qicon.h b/src/gui/image/qicon.h
index ccddf69101..329ae3deb3 100644
--- a/src/gui/image/qicon.h
+++ b/src/gui/image/qicon.h
@@ -105,7 +105,8 @@ public:
void setIsMask(bool isMask);
bool isMask() const;
- static QIcon fromTheme(const QString &name, const QIcon &fallback = QIcon());
+ static QIcon fromTheme(const QString &name);
+ static QIcon fromTheme(const QString &name, const QIcon &fallback);
static bool hasThemeIcon(const QString &name);
static QStringList themeSearchPaths();