systemtray.cpp: Make AppletRemoved signal a singleshot connection
If user disables an entry in system settings, this connection will end up in an endless loop:
When the cleanupPlugin
is called,
we eventually end up calling SystemTray::onEnabledAppletsChanged
through SystemTraySettings::enabledPluginsChanged
signal.
There we delete applet and applets deconstructor calls appletDeleted
.
This then ends up in ContainmentPrivate::appletDeleted
where the signal
appletRemoved
is emitted.
This then makes the signal run over this same connection, then cleanupPlugin
..
And it loops.
Adding Qt::SingleShotConnection
disconnects the connection after
it's called, so it won't get stuck in a loop.
Edited by Akseli Lahtinen