Delete QQmlObjectSharedEngine context in sync with QQmlObject
ClosedPublic

Authored by davidedmundson on Sep 17 2019, 2:27 PM.

Details

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

Diff Detail

Repository
R296 KDeclarative
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.Sep 17 2019, 2:27 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 17 2019, 2:27 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Sep 17 2019, 2:27 PM
davidedmundson edited the summary of this revision. (Show Details)Sep 17 2019, 2:30 PM
dfaure accepted this revision.Sep 17 2019, 4:26 PM

This fixes the crash for me. Thanks!

This revision is now accepted and ready to land.Sep 17 2019, 4:26 PM
This revision was automatically updated to reflect the committed changes.