Delete QQmlObjectSharedEngine context in sync with QQmlObject

Authored by davidedmundson on Sep 18 2019, 12:47 PM.

Description

Delete QQmlObjectSharedEngine context in sync with QQmlObject

Summary:
Otherwise we leave a context dangling with no engine, which is weird.

I suspect it was done like this as we need the context to outlive the
superclass QQmlObject destructor, but we can use the QObject
child-parent for that.

It shouldn't have any negative behavioural changes as this matches the
behaviour of QmlObject which all original code was once ported from.

See also https://bugreports.qt.io/browse/QTBUG-78326

Test Plan:
Ran Qt5.14
Locked the screen
Unlocked the screen, successfully

Reviewers: Plasma, dfaure

Reviewed By: dfaure

Subscribers: kde-frameworks-devel

Tags: Frameworks

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

Details