QIconLoader: reset search paths when theme name is cleared
When we reset the theme so that icons should be provided by the system theme, then reset the search paths to the system-provided paths as well. Otherwise we'll keep looking for the system theme in user-provided search paths, which can't work. Pick-to: 6.6 Change-Id: I10bcb404db9924e038f6fdc8970e53bbb69ac7d1 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
parent
e2f0495e7e
commit
e1a93b3d9a
@ -152,7 +152,13 @@ void QIconLoader::setThemeName(const QString &themeName)
|
||||
|
||||
qCDebug(lcIconLoader) << "Setting user theme name to" << themeName;
|
||||
|
||||
const bool hadUserTheme = hasUserTheme();
|
||||
m_userTheme = themeName;
|
||||
// if we cleared the user theme, then reset search paths as well,
|
||||
// otherwise we'll keep looking in the user-defined search paths for
|
||||
// a system-provide theme, which will never work.
|
||||
if (!hasUserTheme() && hadUserTheme)
|
||||
setThemeSearchPath(systemIconSearchPaths());
|
||||
invalidateKey();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user