ItemContainer: disconnect signals in destructor

Authored by alnikiforov on Mar 6 2020, 11:41 AM.

Description

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:

  1. Unlock widgets via command: qdbus org.kde.plasmashell /PlasmaShell evaluateScript "lockCorona(false)"
  2. On desktop push right mouse button and select menu item 'Add Widgets...'
  3. 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
  4. Remove just added widgets in random order
  5. 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.
  6. lock widgets via command: qdbus org.kde.plasmashell /PlasmaShell evaluateScript "lockCorona(true)"
  7. repeat steps 1-6 multiple times
  8. 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

Details

Committed
davidedmundsonMar 6 2020, 11:42 AM
Reviewer
davidedmundson
Differential Revision
D27650: ItemContainer: disconnect signals in destructor
Parents
R120:99af9acbca2c: Update version number for 5.18.2 GIT_SILENT
Branches
Unknown
Tags
Unknown