summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qicon.cpp
diff options
context:
space:
mode:
authorKevin Ottens <ervin@kde.org>2013-03-22 08:47:51 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-22 20:19:28 +0200
commitaa5f70c00a88edcddd26e8fea767a40e8c5c31b8 (patch)
tree84a5a691caabedc8f50d6190d494963469f9d698 /src/gui/image/qicon.cpp
parentae0fd6884d30ae2ce084e239468696aaec7f5795 (diff)
Make sure QIconLoader is always initialized
It is necessary to properly initialize the icon loader in all case. Otherwise some calls might give wrong results if a platform theme plugin is involved. For instance, we might miss the actual theme name reported by the platform theme, eg it's what happen with QStyle::standardPixmap if no one created a QIcon before its first call. Also clean up the accesses to the global static and have only QIconLoader::instance() use it. All other call go through the static method. This way only instance() needs to call ensureInitialized(), definitely safer and looks cleaner to me. Change-Id: Id3ea6816edd5a65586004f69464960abc3602cf8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/gui/image/qicon.cpp')
-rw-r--r--src/gui/image/qicon.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index d73cd0aa57..ea35da54dc 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -1063,7 +1063,6 @@ void QIcon::setThemeName(const QString &name)
*/
QString QIcon::themeName()
{
- QIconLoader::instance()->ensureInitialized();
return QIconLoader::instance()->themeName();
}