From 71338b4b2f01268759f7ac6b3eff5abb17420a7c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 25 Oct 2013 14:23:39 +0200 Subject: Resolve member expressions of QObject members ...when the base is a QObject property itself or an ID referenced object. This patch resolves for example the width property in a parent.width expression to be a per-index lookup at run-time. That requires the base ("parent") however to be a final property or come from an object where expected revision is known, i.e. a QML imported object (scope or context). Change-Id: Iaa1f57ace452da5e059c1d4e63b52b316e1a6b08 Reviewed-by: Lars Knoll --- src/qml/qml/qqmlcompiler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/qml/qml/qqmlcompiler.cpp') diff --git a/src/qml/qml/qqmlcompiler.cpp b/src/qml/qml/qqmlcompiler.cpp index 3f57d7c2ef..fc8570d128 100644 --- a/src/qml/qml/qqmlcompiler.cpp +++ b/src/qml/qml/qqmlcompiler.cpp @@ -3657,7 +3657,7 @@ bool QQmlCompiler::completeComponentBuild() const QString &sourceCode = jsEngine->code(); AST::UiProgram *qmlRoot = parser.qmlRoot(); - JSCodeGen jsCodeGen(unit->finalUrlString(), sourceCode, jsModule.data(), jsEngine, qmlRoot, output->importCache); + JSCodeGen jsCodeGen(enginePrivate, unit->finalUrlString(), sourceCode, jsModule.data(), jsEngine, qmlRoot, output->importCache); JSCodeGen::ObjectIdMapping idMapping; if (compileState->ids.count() > 0) { @@ -3666,6 +3666,7 @@ bool QQmlCompiler::completeComponentBuild() JSCodeGen::IdMapping m; m.name = o->id; m.idIndex = o->idIndex; + m.type = o->metatype; idMapping << m; } } -- cgit v1.2.3