Cleanup Virtual Desktop Manager list entry in PlasmaVirtualDesktop destructor
ClosedPublic

Authored by davidedmundson on Nov 5 2018, 3:17 PM.

Details

Summary

Current code contains a path to cleanup
PlasmaVirtualDesktopManagementInterface's list of destops if the
PlasmaVirtualDesktop object is destroyed.

However at the time that this is run, the entry in the list is already
dangling and therefore shouldn't be used.

This patch moves the cleanup logic into the destructor of
PlasmaVirtualDesktop, however this means we need to make sure
PlasmaVirtualDesktopManagementInterface outlives the
PlasmaVirtualDesktop by performing an explicit early cleanup instead of
relying on QObject.

Test Plan

Relevant unit test still passes.

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Nov 5 2018, 3:17 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 5 2018, 3:17 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Nov 5 2018, 3:17 PM
mart accepted this revision.Nov 13 2018, 4:09 PM
This revision is now accepted and ready to land.Nov 13 2018, 4:09 PM
This revision was automatically updated to reflect the committed changes.