summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-02-03 06:04:48 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-02-03 06:04:48 (GMT)
commitbacc9a899aaee5e81d74e86fd30d46f4ab537488 (patch)
tree213bdddc1b7b91944cc91ceb2beda72ca92134b2 /src/declarative
parent135e8cd5be1b15a265f11f9e5dc99091d64dc090 (diff)
downloadQt-bacc9a899aaee5e81d74e86fd30d46f4ab537488.zip
Qt-bacc9a899aaee5e81d74e86fd30d46f4ab537488.tar.gz
Qt-bacc9a899aaee5e81d74e86fd30d46f4ab537488.tar.bz2
Don't enforce lower-case starting letters for ids yet; just print a
warning for now.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qmlcompiler.cpp7
1 files 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)