From 131f03f5725a57412d29323edf595ee3199103a4 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 18 Mar 2010 14:38:22 +1000 Subject: Optimize id checking. id must be lowercase; types and namespaces must be uppercase cannot conflict, so remove check. --- src/declarative/qml/qdeclarativecompiler.cpp | 10 ---------- 1 file changed, 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")); -- cgit v0.12