KActionCollection: provide a changed() signal as a replacement for removed()

Authored by dfaure on Dec 13 2019, 10:23 PM.

Description

KActionCollection: provide a changed() signal as a replacement for removed()

Summary:
removed() is deprecated since 5.0 because the code has to downcast a partially
destroyed QObject back to a QAction (from the slot connected to
destroyed()). This is very dangerous, calling QAction methods will just
crash.

plasma-framework/src/scriptengines/qml/plasmoid/containmentinterface.cpp
is using that removed() signal, but doesn't care about the argument,
it's connecting both inserted() and removed() to a generic changed
signal used to notify QML.

For this use case, all we need in KActionCollection is a changed() signal
with no argument, emitted for both insertion and removal.

This makes me wonder if inserted() still is useful at all, but well, it
doesn't hurt to keep it.

Test Plan: Builds, new test method passes

Reviewers: kossebau, mart, davidedmundson, vkrause, nicolasfella

Reviewed By: vkrause

Subscribers: kde-frameworks-devel

Tags: Frameworks

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