Comment 19 for bug 1759328

Revision history for this message
In , U26 (u26) wrote :

Git commit 2785916d01b26f5e9747bdf38428adce0a121842 by David Edmundson.
Committed on 10/04/2018 at 13:38.
Pushed by davidedmundson into branch 'master'.

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.

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

M +2 -5 src/plasmaquick/containmentview.cpp

https://commits.kde.org/plasma-framework/2785916d01b26f5e9747bdf38428adce0a121842