[PlasmaCore.IconItem] Regression: fix crash on source change

Authored by kmaterka on Apr 30 2020, 8:06 PM.

Description

[PlasmaCore.IconItem] Regression: fix crash on source change

Summary:
When SvgSource is changed, old one is deleted. Connections are not automatically disconnected.
This change disconnects connections and fixes regression introduced in D28470.

BUG: 420801
FIXED-IN: 5.70

Test Plan:
STEPS TO REPRODUCE

  1. click on mute button for a device
  2. click on the desktop to collapse the applet

OBSERVED RESULT
crash in step 1 and in the rare case it doesn't crash it crash in step 2
EXPECTED RESULT
don't crash

Reviewers: Plasma, Frameworks, ngraham, davidedmundson

Reviewed By: ngraham

Subscribers: kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D29314