summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcompiler.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-12-15 23:40:17 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-12-15 23:42:05 (GMT)
commit0957269eac949f20685a4437a5252d6cd3b40375 (patch)
tree0e204ef81b7abdb09a1cfe0f661d12fc36f07f9d /src/declarative/qml/qmlcompiler.cpp
parent211a63a1e3669055e28dfba4cff1e2b7f6e5e3ca (diff)
downloadQt-0957269eac949f20685a4437a5252d6cd3b40375.zip
Qt-0957269eac949f20685a4437a5252d6cd3b40375.tar.gz
Qt-0957269eac949f20685a4437a5252d6cd3b40375.tar.bz2
Improve property alias exceptions.
Make sure the proper location is given, and provide more specific error messages.
Diffstat (limited to 'src/declarative/qml/qmlcompiler.cpp')
-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 53ea18e..00c37b6 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -2344,10 +2344,10 @@ bool QmlCompiler::compileAlias(QMetaObjectBuilder &builder,
QStringList alias = astNodeToStringList(node);
if (alias.count() != 1 && alias.count() != 2)
- COMPILE_EXCEPTION(prop.defaultValue, QCoreApplication::translate("QmlCompiler","Invalid alias location"));
+ COMPILE_EXCEPTION(prop.defaultValue, QCoreApplication::translate("QmlCompiler","Invalid alias reference. An alias reference must be specified as <id> or <id>.<property>"));
if (!compileState.ids.contains(alias.at(0)))
- COMPILE_EXCEPTION(prop.defaultValue, QCoreApplication::translate("QmlCompiler","Invalid alias location"));
+ COMPILE_EXCEPTION(prop.defaultValue, QCoreApplication::translate("QmlCompiler","Invalid alias reference. Unable to find id \"%1\"").arg(alias.at(0)));
Object *idObject = compileState.ids[alias.at(0)];