Fix applets not being added on service restart

Summary:
Applet::destroy doesn't delete the applet from Containment::applets in
the same event. Potentially a dbus activated service being restarted can
be added in this time, causing us to try adding a new applet with the
same ID before the first object is deleted.

Reviewers: #plasma, mart

Reviewed By: mart

Subscribers: mart, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D2703
wilder-5.14
David Edmundson 10 years ago
parent ac7245667e
commit 62ac5cd17b
  1. 6
      applets/systemtray/systemtray.cpp

@ -109,7 +109,11 @@ void SystemTray::newTask(const QString &task)
//only allow one instance per applet
if (task == applet->pluginInfo().pluginName()) {
return;
//Applet::destroy doesn't delete the applet from Containment::applets in the same event
//potentially a dbus activated service being restarted can be added in this time.
if (!applet->destroyed()) {
return;
}
}
}

Loading…
Cancel
Save