Skip to content

systemtray.cpp: Make AppletRemoved signal a singleshot connection

Akseli Lahtinen requested to merge work/akselmo/systray-fix-recursive-loop into master

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.

BUG:494003

Edited by Akseli Lahtinen

Merge request reports

Loading