diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-09-02 07:37:56 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-09-02 07:37:56 (GMT) |
commit | 9b196634ab888acffa4582fcdb812a454c8b010f (patch) | |
tree | c103059dbf2a1c0ceb31f8cb8256a3d43e3b78fd /src | |
parent | 8ba41d00ff13c92e09d66321c5598a3855059060 (diff) | |
parent | c098bcee13c27bf9ef3680a67faa5b66d1e34504 (diff) | |
download | Qt-9b196634ab888acffa4582fcdb812a454c8b010f.zip Qt-9b196634ab888acffa4582fcdb812a454c8b010f.tar.gz Qt-9b196634ab888acffa4582fcdb812a454c8b010f.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/qmlcompiler.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index 070add7..c0f7bfd 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -1452,10 +1452,13 @@ bool QmlCompiler::buildIdProperty(QmlParser::Property *prop, if (!isValidId(val)) COMPILE_EXCEPTION(prop, val << "is not a valid object id"); - // We disallow id's that conflict with import prefixes + // We disallow id's that conflict with import prefixes and types QmlEnginePrivate::ImportedNamespace *ns = 0; + QmlType *type = 0; QmlEnginePrivate::get(engine)->resolveType(unit->imports, val.toUtf8(), - 0, 0, 0, 0, &ns); + &type, 0, 0, 0, &ns); + if (type) + COMPILE_EXCEPTION(idValue, "id conflicts with type name"); if (ns) COMPILE_EXCEPTION(idValue, "id conflicts with namespace prefix"); |