Reset parentItem when mainItem changes
ClosedPublic

Authored by broulik on Dec 12 2018, 2:31 PM.

Details

Summary

Otherwise we'll keep piling up custom tooltip items in the dialog. They're invisible but they're still there.

Test Plan

Kept the contentItem visible, moved between TM and kickoff, tooltip no longer ends up with multiple items in it:
Before:


They're not "leaked" as it doesn't change ownership (parent vs parentItem) but it still adds unnccessary invisible items to the window

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Dec 12 2018, 2:31 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 12 2018, 2:31 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
broulik requested review of this revision.Dec 12 2018, 2:31 PM

Oh, to fix fallout from the other review. NM

mart accepted this revision.Jan 10 2019, 11:10 AM

sometimes in the past i had problems about setting parentitem of an item to nullptr, due to all the scenegraph nodes of the item being destroyed and recreated...
somewhere else to do something like that i did have a dummy qquickitem invisible and reparented stuff to that instead of nullptr

this looks cleaner, so i would say go for it and if will cause problems, then go for the above workaround

This revision is now accepted and ready to land.Jan 10 2019, 11:10 AM
This revision was automatically updated to reflect the committed changes.