waylandtasksmodel: Fix transient filtering when parent is destroyed
waylandtasksmodel: Signal window being destroyed
It's guarded by a QPointer but we still need to emit the change signal when it's destroyed.
waylandtasksmodel: Delete window after signalling rows removed
"Take" it from the vector but only destroy it after the model has done its thing. Deleting the item will trigger QObject::destroyed handlers which might add/remove items from the model whilst we're removing rows ourselves.
I would have assumed the “unmapped” connection to be sufficient but I believe I get a set_parent_window
and a destruction and then the change signal isn’t emitted because in setParentWindow(null)
the QPointer
is already nullptr
, i.e. no change.
Tries to fix closing the KCM while the KAuth prompt is shown. Still doesn’t fully work, most of the time the window shows up but sometimes it doesn”t … also feels dirty.