Avoid potential disconnect of all signals in IconItem

Authored by davidedmundson on May 14 2020, 11:19 AM.

Description

Avoid potential disconnect of all signals in IconItem

Summary:
m_svgIcon can be null.

disconnect(q, nullptr, nullptr, nullptr); would have pretty catastrophic
consequences as it disconnects everything. Anyone listening for
QObject::destroyed of IconItem for cleanup would no longer get anything.
That could lead to obscure conditions.

ShaderEffectSource watches for the source being destroyed for cleanup
and we have a newly introduced crash with ShaderEffectSource that seems
to come from this patch.

BUG: 421170

Test Plan:
Someone who could reproduce the crash reliably confirms it fixes the
issue

Reviewers: Plasma

Subscribers: kde-frameworks-devel

Tags: Frameworks

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

Details