diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-09-23 16:25:13 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-25 13:13:30 +0200 |
commit | 17588320da4598c61a72ac156d23f96a52d4c2fe (patch) | |
tree | 37ce9ed9fc8201cd200cf27152dbcf1193c57bd3 /src | |
parent | 5c6534773f5329d6245891879ff2eb5f82b1f2a0 (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.cpp | 2 |
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; |