summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qiconloader_p.h
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2010-03-04 11:16:16 +0100
committerJens Bache-Wiig <jbache@trolltech.com>2010-03-04 11:19:16 +0100
commit7727a4355876607a1a022ff54e2570dae883f79c (patch)
treec88526dd233bc33136b17d49f8af60946649f2a3 /src/gui/image/qiconloader_p.h
parent6f974452ec60ec03fd64bb2d12be6544435ae6be (diff)
Do not crash when loading themed icons statically
We do not officially support static loading of icons. In fact they still crash for simple png cases due to missing X11 resources. But since we lazily create themed icons we can certainly avoid the crash in this case. You will not be able to use fallbacks here though, since we cannot know if a fallback should be used or not in this case. Reviewed-by: ogoffart Task-number: QTBUG-8666
Diffstat (limited to 'src/gui/image/qiconloader_p.h')
-rw-r--r--src/gui/image/qiconloader_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/image/qiconloader_p.h b/src/gui/image/qiconloader_p.h
index 19f2ddaf56..a6b5f5bf12 100644
--- a/src/gui/image/qiconloader_p.h
+++ b/src/gui/image/qiconloader_p.h
@@ -169,6 +169,7 @@ public:
static QIconLoader *instance();
void updateSystemTheme();
void invalidateKey() { m_themeKey++; }
+ void ensureInitialized();
private:
QThemeIconEntries findIconHelper(const QString &themeName,
@@ -176,6 +177,7 @@ private:
QStringList &visited) const;
uint m_themeKey;
bool m_supportsSvg;
+ bool m_initialized;
mutable QString m_userTheme;
mutable QString m_systemTheme;