summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-03-18 04:38:22 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-03-18 05:02:08 (GMT)
commit131f03f5725a57412d29323edf595ee3199103a4 (patch)
treefc2278bb9d77583e84b0ab452eacbe3a698feb69 /src/declarative
parentb440beba19519e9211752656fdfeda250a35c81f (diff)
downloadQt-131f03f5725a57412d29323edf595ee3199103a4.zip
Qt-131f03f5725a57412d29323edf595ee3199103a4.tar.gz
Qt-131f03f5725a57412d29323edf595ee3199103a4.tar.bz2
Optimize id checking.
id must be lowercase; types and namespaces must be uppercase cannot conflict, so remove check.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index c085556..42d2950 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -1713,16 +1713,6 @@ bool QDeclarativeCompiler::buildIdProperty(QDeclarativeParser::Property *prop,
COMPILE_CHECK(checkValidId(idValue, val));
- // We disallow id's that conflict with import prefixes and types
- QDeclarativeEnginePrivate::ImportedNamespace *ns = 0;
- QDeclarativeType *type = 0;
- QDeclarativeEnginePrivate::get(engine)->resolveType(unit->imports, val.toUtf8(),
- &type, 0, 0, 0, &ns);
- if (type)
- COMPILE_EXCEPTION(idValue, QCoreApplication::translate("QDeclarativeCompiler","id conflicts with type name"));
- if (ns)
- COMPILE_EXCEPTION(idValue, QCoreApplication::translate("QDeclarativeCompiler","id conflicts with namespace prefix"));
-
if (compileState.ids.contains(val))
COMPILE_EXCEPTION(prop, QCoreApplication::translate("QDeclarativeCompiler","id is not unique"));