aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-09-23 16:25:13 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-25 13:13:30 +0200
commit17588320da4598c61a72ac156d23f96a52d4c2fe (patch)
tree37ce9ed9fc8201cd200cf27152dbcf1193c57bd3 /src
parent5c6534773f5329d6245891879ff2eb5f82b1f2a0 (diff)
Fix lookup scopes into the context object
Given QtObject { property int value: 42 property var o: QtObject { Component.onCompleted: print(value) } } Should print 42 - the lookup for "value" should fail in the scope object (o) and succeed in the context object. Fixes part of tst_qqmllanguage::onCompleted Change-Id: If48d6a780aa0f3cb4a7757694f93359e57757973 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index b34ae1c223..fc841a916a 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -534,6 +534,8 @@ QObject *QmlObjectCreator::create(int subComponentIndex, QObject *parent)
ddata->compiledData = compiledData;
ddata->compiledData->addref();
+ context->contextObject = instance;
+
QQmlEnginePrivate::get(engine)->registerInternalCompositeType(compiledData);
}
return instance;