[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [plasma-framework] src/plasma/private: Check for metadata validty in settingsFileChanged
From:       David Edmundson <kde () davidedmundson ! co ! uk>
Date:       2016-11-22 10:44:37
Message-ID: E1c98Z3-0002JC-Gv () code ! kde ! org
[Download RAW message or body]

Git commit 760fb53e7dcc873f4ec90e726d16f766daabf99f by David Edmundson.
Committed on 22/11/2016 at 10:44.
Pushed by davidedmundson into branch 'master'.

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

M  +1    -1    src/plasma/private/theme_p.cpp

http://commits.kde.org/plasma-framework/760fb53e7dcc873f4ec90e726d16f766daabf99f

diff --git a/src/plasma/private/theme_p.cpp b/src/plasma/private/theme_p.cpp
index 0f3662e..b90561a 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))) {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic