summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-02-23 11:45:38 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-02-23 11:45:38 (GMT)
commitd43ec1bdb12649c32f0f0067492857a70bef05b4 (patch)
tree4b37ea692288f646690e71c0f1c4de0acfa118f1 /src/declarative
parentb4d55d5288ddae325046f62f65cbf667283b3859 (diff)
downloadQt-d43ec1bdb12649c32f0f0067492857a70bef05b4.zip
Qt-d43ec1bdb12649c32f0f0067492857a70bef05b4.tar.gz
Qt-d43ec1bdb12649c32f0f0067492857a70bef05b4.tar.bz2
More precise compiler errors
People were having trouble figureing what was wrong based off the previous error message. This should now be rectified - at least for users who read the docs. Reviewed-by: mae
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qmlcompiler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index 4508964..4365b17 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -1132,10 +1132,10 @@ bool QmlCompiler::buildComponent(QmlParser::Object *obj,
Property *idProp = 0;
if (obj->properties.count() > 1 ||
(obj->properties.count() == 1 && obj->properties.begin().key() != "id"))
- COMPILE_EXCEPTION(*obj->properties.begin(), QCoreApplication::translate("QmlCompiler","Invalid component specification"));
+ COMPILE_EXCEPTION(*obj->properties.begin(), QCoreApplication::translate("QmlCompiler","Component elements may not contain properties other than id"));
if (!obj->scriptBlockObjects.isEmpty())
- COMPILE_EXCEPTION(obj->scriptBlockObjects.first(), QCoreApplication::translate("QmlCompiler","Invalid component specification"));
+ COMPILE_EXCEPTION(obj->scriptBlockObjects.first(), QCoreApplication::translate("QmlCompiler","Component elements may not contain script blocks"));
if (obj->properties.count())
idProp = *obj->properties.begin();