diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-03-20 13:46:57 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-03-20 13:49:28 +0100 |
commit | 76c0be34cd4ff4564693162fa7528463e23ce9d8 (patch) | |
tree | f165b7bc319548fb0082365411a871028f92e89e /src/gui/image/qicon.cpp | |
parent | 27b4fe96b59e9e63d1e570e802c072e9afdfb2d4 (diff) | |
parent | 36cb3f3f655a9090c82de609010cbfb88651a0f3 (diff) |
Merge branch 'dev' into stable
This starts Qt 5.1 release cycle
Conflicts:
src/gui/text/qfontdatabase.cpp
src/gui/text/qharfbuzz_copy_p.h
src/widgets/kernel/qapplication.cpp
src/widgets/kernel/qcoreapplication.cpp
Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
Diffstat (limited to 'src/gui/image/qicon.cpp')
-rw-r--r-- | src/gui/image/qicon.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index a297c32b3c..1b36fa257a 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -60,6 +60,7 @@ #include "private/qhexstring_p.h" #include "private/qguiapplication_p.h" +#include "qpa/qplatformtheme.h" #ifndef QT_NO_ICON QT_BEGIN_NAMESPACE @@ -987,7 +988,10 @@ QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback) if (qtIconCache()->contains(name)) { icon = *qtIconCache()->object(name); } else { - QIcon *cachedIcon = new QIcon(new QIconLoaderEngine(name)); + QPlatformTheme * const platformTheme = QGuiApplicationPrivate::platformTheme(); + QIconEngine * const engine = platformTheme ? platformTheme->createIconEngine(name) + : new QIconLoaderEngine(name); + QIcon *cachedIcon = new QIcon(engine); qtIconCache()->insert(name, cachedIcon); icon = *cachedIcon; } |