From bacc9a899aaee5e81d74e86fd30d46f4ab537488 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 3 Feb 2010 16:04:48 +1000 Subject: Don't enforce lower-case starting letters for ids yet; just print a warning for now. --- src/declarative/qml/qmlcompiler.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index a7ae649..26ebd27 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -123,8 +123,11 @@ bool QmlCompiler::isValidId(const QString &val) if (val.isEmpty()) return false; - if (val.at(0).isLetter() && !val.at(0).isLower()) - return false; + // TODO this will be enforced and return false + if (val.at(0).isLetter() && !val.at(0).isLower()) { + //return false; + qWarning() << "id '" + val + "' is invalid: ids cannot start with uppercase letters. This will be enforced in an upcoming version of QML."; + } QChar u(QLatin1Char('_')); for (int ii = 0; ii < val.count(); ++ii) -- cgit v0.12