summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmundson <kde@davidedmundson.co.uk>2017-04-20 10:56:25 (GMT)
committerDavid Edmundson <kde@davidedmundson.co.uk>2017-04-20 10:56:25 (GMT)
commit4421cc3041b9d172378ba5774241f7079f802073 (patch)
tree6649bd921aca35648b833a57c5569be23f4d59bd
parentecbcf6f831020b415325fb36acb2efb957457e75 (diff)
Don't remove other applets in SystemTray::cleanupTask
Summary: We can get into a state where we have applets with broken metadata. (which is a different bug) Someone clearly wrote this code to try and guard against accessing an invalid metadata when checking names, but instead made it so that when we try to remove a specific task in the system tray we accidentally also remove up any of these applets as well, which doesn't make much sense. CCBUG: 377050 Reviewers: #plasma, mart Reviewed By: mart Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D5422
-rw-r--r--applets/systemtray/systemtray.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/applets/systemtray/systemtray.cpp b/applets/systemtray/systemtray.cpp
index a23c4cf..098395d 100644
--- a/applets/systemtray/systemtray.cpp
+++ b/applets/systemtray/systemtray.cpp
@@ -130,7 +130,7 @@ void SystemTray::newTask(const QString &task)
void SystemTray::cleanupTask(const QString &task)
{
foreach (Plasma::Applet *applet, applets()) {
- if (!applet->pluginMetaData().isValid() || task == applet->pluginMetaData().pluginId()) {
+ if (applet->pluginMetaData().isValid() && task == applet->pluginMetaData().pluginId()) {
//we are *not* cleaning the config here, because since is one
//of those automatically loaded/unloaded by dbus, we want to recycle
//the config the next time it's loaded, in case the user configured something here