summaryrefslogtreecommitdiff
path: root/core/launcher/systray.cpp
Unidiff
Diffstat (limited to 'core/launcher/systray.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/systray.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/launcher/systray.cpp b/core/launcher/systray.cpp
index 64356ca..6122770 100644
--- a/core/launcher/systray.cpp
+++ b/core/launcher/systray.cpp
@@ -66,12 +66,20 @@ void SysTray::loadApplets()
66} 66}
67 67
68void SysTray::clearApplets() 68void SysTray::clearApplets()
69{ 69{
70#ifndef QT_NO_COMPONENTS 70#ifndef QT_NO_COMPONENTS
71 71
72 /*
73 * Note on clearing. SOme applets delete their
74 * applets themselves some don't do it
75 * and on restart this can crash. If we delete it
76 * here we might end up in a double deletion. We could
77 * use QGuardedPtr but that would be one QOBject
78 * for every applet more but only useful for restart
79 */
72 QValueList<TaskbarApplet>::Iterator mit; 80 QValueList<TaskbarApplet>::Iterator mit;
73 for ( mit = appletList.begin(); mit != appletList.end(); ++mit ) { 81 for ( mit = appletList.begin(); mit != appletList.end(); ++mit ) {
74 (*mit).iface->release(); 82 (*mit).iface->release();
75 (*mit).library->unload(); 83 (*mit).library->unload();
76 delete (*mit).library; 84 delete (*mit).library;
77 } 85 }