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

Authored by dfaure on Nov 20 2019, 11:11 PM.



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

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

Diff Detail

R263 KXmlGui
No Linters Available
No Unit Test Coverage
Build Status
Buildable 19007
Build 19025: arc lint + arc unit
dfaure created this revision.Nov 20 2019, 11:11 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 20 2019, 11:11 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
dfaure requested review of this revision.Nov 20 2019, 11:11 PM
vkrause accepted this revision.Dec 2 2019, 2:59 PM
This revision is now accepted and ready to land.Dec 2 2019, 2:59 PM
dfaure closed this revision.Dec 13 2019, 10:26 PM