From 760fb53e7dcc873f4ec90e726d16f766daabf99f Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Tue, 22 Nov 2016 10:43:57 +0000 Subject: [PATCH] Check for metadata validty in settingsFileChanged settingsFileChanged is called if the plugin metadata file changes, and reloads the theme if the version changes. However, if the metadata file now doesn't exist we need to check before calling .version() otherwise it will assert. If it doesn't exist, we want to reload the theme so that it will load the correct thing. BUG: 372651 REVIEW: 129436 --- src/plasma/private/theme_p.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plasma/private/theme_p.cpp b/src/plasma/private/theme_p.cpp index 0f3662e8f..b90561a48 100644 --- a/src/plasma/private/theme_p.cpp +++ b/src/plasma/private/theme_p.cpp @@ -582,7 +582,7 @@ void ThemePrivate::settingsFileChanged(const QString &file) qCDebug(LOG_PLASMA) << "settingsFile: " << file; if (file == themeMetadataPath) { const KPluginInfo pluginInfo(themeMetadataPath); - if (themeVersion != pluginInfo.version()) { + if (!pluginInfo.isValid() || themeVersion != pluginInfo.version()) { scheduleThemeChangeNotification(SvgElementsCache); } } else if (file.endsWith(QLatin1String(themeRcFile))) {