From 3e3de9e357fa55074ff6025d68c0477ac5da30ae Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 16 Jan 2014 17:29:40 +0100 Subject: [new compiler] Fix id mapping in implicitly defined components When scanning for component roots of explicitly defined components, make sure to skip synthetized ones. Now samegame runs :) Change-Id: If64171aefc1105a130a1a50e855af87977d2f3af Reviewed-by: Lars Knoll --- src/qml/compiler/qqmltypecompiler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp index d6dde63d4b..a4301fdc08 100644 --- a/src/qml/compiler/qqmltypecompiler.cpp +++ b/src/qml/compiler/qqmltypecompiler.cpp @@ -841,7 +841,8 @@ bool QQmlComponentAndAliasResolver::resolve() // someItemDelegate: Item {} // In the implicit case Item is surrounded by a synthetic Component {} because the property // on the left hand side is of QQmlComponent type. - for (int i = 0; i < qmlObjects->count(); ++i) { + const int objCountWithoutSynthesizedComponents = qmlObjects->count(); + for (int i = 0; i < objCountWithoutSynthesizedComponents; ++i) { const QtQml::QmlObject *obj = qmlObjects->at(i); if (stringAt(obj->inheritedTypeNameIndex).isEmpty()) continue; -- cgit v1.2.3