From 66d8faf152a31e06958d35a0e0655ef7a297ebe9 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 17 Jul 2009 10:26:44 +1000 Subject: Always set the id before calling setId() --- src/declarative/qml/qmlcompiler.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index b0bc6e8..220c464 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -940,9 +940,8 @@ bool QmlCompiler::buildComponent(QmlParser::Object *obj, if (compileState.ids.contains(idVal)) COMPILE_EXCEPTION(obj, "id is not unique"); - addId(idVal, obj); - obj->id = idVal; + addId(idVal, obj); } // Check the Component tree is well formed @@ -1343,10 +1342,9 @@ bool QmlCompiler::buildIdProperty(QmlParser::Property *prop, if (compileState.ids.contains(val)) COMPILE_EXCEPTION(prop, "id is not unique"); - obj->id = val; - prop->values.at(0)->type = Value::Id; + obj->id = val; addId(val, obj); return true; -- cgit v0.12