Don't alter memory management to hide an item

Authored by davidedmundson on Apr 10 2018, 1:38 PM.

Description

Don't alter memory management to hide an item

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

Reviewers: Plasma, mart

Reviewed By: Plasma, mart

Subscribers: rikmills, Frameworks

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D12064

Details

Committed
davidedmundsonApr 10 2018, 1:38 PM
Reviewer
Plasma
Differential Revision
D12064: Don't alter memory management to hide an item
Parents
R242:26d9c50a4b05: SVN_SILENT made messages (.desktop file) - always resolve ours
Branches
Unknown
Tags
Unknown