From 7df73c27121149c36a6c8a21850d85728ea79ad5 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 30 Sep 2013 08:56:29 +0200 Subject: [PATCH] Improve error location reporting for invalid aliases in old VME 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 --- src/qml/qml/qqmlcompiler.cpp | 2 +- tests/auto/qml/qqmllanguage/data/invalidAlias.1.errors.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qml/qml/qqmlcompiler.cpp b/src/qml/qml/qqmlcompiler.cpp index 08ae37e..a17080f 100644 --- a/src/qml/qml/qqmlcompiler.cpp +++ b/src/qml/qml/qqmlcompiler.cpp @@ -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 || diff --git a/tests/auto/qml/qqmllanguage/data/invalidAlias.1.errors.txt b/tests/auto/qml/qqmllanguage/data/invalidAlias.1.errors.txt index 9848e48..00d17af 100644 --- a/tests/auto/qml/qqmllanguage/data/invalidAlias.1.errors.txt +++ b/tests/auto/qml/qqmllanguage/data/invalidAlias.1.errors.txt @@ -1 +1 @@ -3:1:No property alias location +4:5:No property alias location -- 2.7.4