Skip to content

Make QQmlContext's contextObject outlive the QQmlContext

David Edmundson requested to merge work/without_context into master

Right now both objects are children of the QmlObject, this isn't well defined.

If the KLocalizedContext object is destroyed first the rootContext effecitvely can still be alive with a now dangling contextObject assigned.

Should any code run in the QQmlContext destructor (such as Component.onDestructed functions) it could end up crashing should it hit anything that uses root context object which is most things.

Merge request reports