Improve error location reporting for invalid aliases in old VME
authorSimon Hausmann <simon.hausmann@digia.com>
Mon, 30 Sep 2013 06:56:29 +0000 (08:56 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 30 Sep 2013 16:21:56 +0000 (18:21 +0200)
When an alias declaration is missing a location, report the error with the
location of the alias declaration, not the object declaration.  This matches
the code patch in the new compiler, which also reports it accurately.

Change-Id: I709dbddb3273f4e05cc4d63079da52d7224466bd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/qml/qqmlcompiler.cpp
tests/auto/qml/qqmllanguage/data/invalidAlias.1.errors.txt

index 08ae37e..a17080f 100644 (file)
@@ -3243,7 +3243,7 @@ bool QQmlCompiler::buildDynamicMetaAliases(QQmlScript::Object *obj)
             continue;
 
         if (!p->defaultValue)
-            COMPILE_EXCEPTION(obj, tr("No property alias location"));
+            COMPILE_EXCEPTION(p, tr("No property alias location"));
 
         if (!p->defaultValue->values.isOne() ||
             p->defaultValue->values.first()->object ||