summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcompiler.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-17 00:26:44 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-17 00:26:44 (GMT)
commit66d8faf152a31e06958d35a0e0655ef7a297ebe9 (patch)
tree1295e5997f42ab40f1ac250d0b95abeacfff961a /src/declarative/qml/qmlcompiler.cpp
parent14275363e5ae678ca92a6da4778035ca2ad1594c (diff)
downloadQt-66d8faf152a31e06958d35a0e0655ef7a297ebe9.zip
Qt-66d8faf152a31e06958d35a0e0655ef7a297ebe9.tar.gz
Qt-66d8faf152a31e06958d35a0e0655ef7a297ebe9.tar.bz2
Always set the id before calling setId()
Diffstat (limited to 'src/declarative/qml/qmlcompiler.cpp')
-rw-r--r--src/declarative/qml/qmlcompiler.cpp6
1 files 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;