[applet] Disconnect monitor targets in a better-supported way
The plasma-pa applet emits near-constant stream of this:
qrc:/plasma/plasmoids/org.kde.plasma.volume/contents/ui/ListItemBase.qml:253:37: Unable to assign [undefined] to QPulseAudio::VolumeObject* qrc:/plasma/plasmoids/org.kde.plasma.volume/contents/ui/ListItemBase.qml:253:37: Unable to assign [undefined] to QPulseAudio::VolumeObject* qrc:/plasma/plasmoids/org.kde.plasma.volume/contents/ui/ListItemBase.qml:253:37: Unable to assign [undefined] to QPulseAudio::VolumeObject*
This is caused by code that conditionally sets a VolumeMonitor
object's's target property to null
. However this is not a valid way
to accomplish that, and QML supports an alternative method of doing
this:define a RESET function for the property on the C++ side, and on
the QML side, set the object to undefined
, not null
This MR makes that change to silence the spam and fix target disconnection.