From 62d3e29b374cd94adcb5fb937fd57d8d21a78594 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Tue, 9 Feb 2010 12:27:08 +0100 Subject: Properly insert objects into the context's object list Fixes a failing autotest, where the object's context pointer was not being reset. This was because the object was not placed properly in the context's contextObjects list and so was not found and cleared when the context was destroyed. --- src/declarative/qml/qmlengine.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index f4dcb7a..81988ed 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -543,6 +543,7 @@ void QmlEngine::setContextForObject(QObject *object, QmlContext *context) data->context = context; data->nextContextObject = context->d_func()->contextObjects; data->prevContextObject = &context->d_func()->contextObjects; + context->d_func()->contextObjects = data; } void qmlExecuteDeferred(QObject *object) -- cgit v0.12