Don't alter memory management to hide an item
ClosedPublic

Authored by davidedmundson on Apr 9 2018, 9:12 AM.

Details

Summary

The original owner of a graphics item is the declarative applet script which
is owned and deleted by the applet.

Reparenting the containmentquickitem to the containment doesn't really
solve anything useful, we were originally effectively owned by the
containment(an applet subclass) not the view anyway.

This code also accidentally moves the destruction of the applet from being in
::~Applet to being in ::~QObject of the relevant containment. This
causes a big problem if the AppletQuickItem tries to access the applet
in it's own destructor. The applet object still exists, but use of
Applet member variables is not valid.

The new preloading code does this, leading to a crash.

BUG: 391642

Test Plan

Changed desktop to folder twice
Changed activities twice

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.
davidedmundson created this revision.Apr 9 2018, 9:12 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 9 2018, 9:12 AM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
davidedmundson requested review of this revision.Apr 9 2018, 9:12 AM

Applied this to 5.44 in test package for Ubuntu 18.04

Switched containment folderview -> desktop and back several times. No longer any crash.

mart accepted this revision.Apr 10 2018, 1:25 PM
This revision is now accepted and ready to land.Apr 10 2018, 1:25 PM
This revision was automatically updated to reflect the committed changes.