ItemContainer: disconnect signals in destructor
Summary:
Otherwise, setLayout function might be called for
already destructed instance of ItemContainer,
leading to double reference counter decrement of m_layout QPointer,
eventually invalidating such pointers prematurely.
BUG: 417603
Test Plan:
- Unlock widgets via command: qdbus org.kde.plasmashell /PlasmaShell evaluateScript "lockCorona(false)"
- On desktop push right mouse button and select menu item 'Add Widgets...'
- Add various widgets to desktop using drag'n'drop on desktop. I've added at least following widgets on same desktop screen: Audio Volume, Battery and Brightness, Binary Clock, Clipboard, Color Picker, Grouping Plasmoid, Quick Chat
- Remove just added widgets in random order
- If necessary, repeat steps 3 and 4 a few times If widgets aren't appearing on desktop despite adding them via drag'n'drop, it's bugged and ready to crash. But it's not a requirement for crash.
- lock widgets via command: qdbus org.kde.plasmashell /PlasmaShell evaluateScript "lockCorona(true)"
- repeat steps 1-6 multiple times
- plasmashell shouldn't crash
Reviewers: ngraham, davidedmundson, mart
Reviewed By: davidedmundson
Subscribers: cfeck, anthonyfieroni, plasma-devel
Tags: Plasma
Differential Revision: https://phabricator.kde.org/D27650