[kstyle] Unregister a shadow when it's destroyed
ClosedPublic

Authored by zzag on Jan 28 2020, 3:02 PM.

Details

Summary

Since lifetime of a KWindowShadow doesn't strictly match the lifetime
of the associated widget, we need to unregister the shadow when it's
destroyed in order to prevent accessing or deleting dangling pointers
afterwards.

CCBUG: 416854

Diff Detail

Repository
R113 Oxygen Theme
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Jan 28 2020, 3:02 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 28 2020, 3:02 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
zzag requested review of this revision.Jan 28 2020, 3:02 PM
zzag added a reviewer: Plasma.Jan 28 2020, 3:02 PM
zzag updated this revision to Diff 74503.Jan 28 2020, 3:21 PM

Clean up _shadows upon a shadow emitting QObject::destroyed()

zzag retitled this revision from [kstyle] Use guarded pointers to store shadows to [kstyle] Unregister a shadow when it's destroyed.Jan 28 2020, 4:02 PM
zzag edited the summary of this revision. (Show Details)
broulik accepted this revision.Jan 28 2020, 4:07 PM
This revision is now accepted and ready to land.Jan 28 2020, 4:07 PM
This revision was automatically updated to reflect the committed changes.