From 307a12d9e2a5ec302e44d29c5ba5ca4cf0f7ebff Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Thu, 15 Oct 2009 18:37:13 +0200 Subject: Use the fallback icon theme name, if the system icon theme name can not be determined. This restores the behavior from before the the gui plugin merge. Reviewed-by: Olivier Goffart --- src/gui/image/qiconloader.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index e7620bd..46c5431 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -89,6 +89,8 @@ QIconLoader::QIconLoader() : m_themeKey(1), m_supportsSvg(false) { m_systemTheme = qt_guiPlatformPlugin()->systemIconThemeName(); + if (m_systemTheme.isEmpty()) + m_systemTheme = fallbackTheme(); QFactoryLoader iconFactoryLoader(QIconEngineFactoryInterfaceV2_iid, QLatin1String("/iconengines"), @@ -109,6 +111,8 @@ void QIconLoader::updateSystemTheme() // Only change if this is not explicitly set by the user if (m_userTheme.isEmpty()) { QString theme = qt_guiPlatformPlugin()->systemIconThemeName(); + if (theme.isEmpty()) + theme = fallbackTheme(); if (theme != m_systemTheme) { m_systemTheme = theme; invalidateKey(); -- cgit v0.12