summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/qml/qmlcompiler.cpp5
-rw-r--r--tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index 4365b17..3702d0b 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -123,10 +123,9 @@ bool QmlCompiler::isValidId(const QString &val)
if (val.isEmpty())
return false;
- // TODO this will be enforced and return false
if (val.at(0).isLetter() && !val.at(0).isLower()) {
- //return false;
- qWarning().nospace() << "id '" << val << "' is invalid: ids cannot start with uppercase letters. This will be enforced in an upcoming version of QML.";
+ qWarning().nospace() << "id " << val << " is invalid: ids cannot start with uppercase letters";
+ return false;
}
QChar u(QLatin1Char('_'));
diff --git a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
index 4090e1d..4d27e32 100644
--- a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
+++ b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
@@ -326,7 +326,7 @@ void tst_qmllanguage::errors()
QFETCH(bool, create);
if (file == "invalidID.6.qml")
- QSKIP("Test disabled until we strictly disallow ids from beginning with uppercase letters", SkipSingle);
+ QTest::ignoreMessage(QtWarningMsg, "id \"StartsWithUpperCase\" is invalid: ids cannot start with uppercase letters");
QmlComponent component(&engine, TEST_FILE(file));