Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/systemtray.cpp
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Line(s) | 124 | if (applet) { | |||
---|---|---|---|---|---|
125 | m_knownPlugins[task] = applet->id(); | 125 | m_knownPlugins[task] = applet->id(); | ||
126 | } | 126 | } | ||
127 | } | 127 | } | ||
128 | } | 128 | } | ||
129 | 129 | | |||
130 | void SystemTray::cleanupTask(const QString &task) | 130 | void SystemTray::cleanupTask(const QString &task) | ||
131 | { | 131 | { | ||
132 | foreach (Plasma::Applet *applet, applets()) { | 132 | foreach (Plasma::Applet *applet, applets()) { | ||
133 | if (!applet->pluginMetaData().isValid() || task == applet->pluginMetaData().pluginId()) { | 133 | if (applet->pluginMetaData().isValid() && task == applet->pluginMetaData().pluginId()) { | ||
134 | //we are *not* cleaning the config here, because since is one | 134 | //we are *not* cleaning the config here, because since is one | ||
135 | //of those automatically loaded/unloaded by dbus, we want to recycle | 135 | //of those automatically loaded/unloaded by dbus, we want to recycle | ||
136 | //the config the next time it's loaded, in case the user configured something here | 136 | //the config the next time it's loaded, in case the user configured something here | ||
137 | applet->deleteLater(); | 137 | applet->deleteLater(); | ||
138 | //HACK: we need to remove the applet from Containment::applets() as soon as possible | 138 | //HACK: we need to remove the applet from Containment::applets() as soon as possible | ||
139 | //otherwise we may have disappearing applets for restarting dbus services | 139 | //otherwise we may have disappearing applets for restarting dbus services | ||
140 | //this may be removed when we depend from a frameworks version in which appletDeleted is emitted as soon as deleteLater() is called | 140 | //this may be removed when we depend from a frameworks version in which appletDeleted is emitted as soon as deleteLater() is called | ||
141 | emit appletDeleted(applet); | 141 | emit appletDeleted(applet); | ||
▲ Show 20 Lines • Show All 420 Lines • Show Last 20 Lines |