aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2015-06-10 21:18:15 +0200
committerAleix Pol Gonzalez <aleixpol@kde.org>2015-06-10 19:44:05 +0000
commit9c61523069d82f016c4cf927e69aea2722c3b80b (patch)
tree40d5f26ca93eab656642b0edcd8ab50ab5e92cb6 /src
parente515fec1025ada6594c564fd5a90743abbc86edd (diff)
Improve qml error message "invalid alias location"
Specify we're talking about the target itself rather than talking location, which I always doubt about whether it's the location within the file. Also specify the offending property, so we get a clue about what to look into. [ChangeLog][QtQml] Improve "invalid alias location" error message by specifying what's the offending property and by calling it "invalid alias target location" Change-Id: I7a9390089ee8986872c119df44d8036bf267ab99 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/compiler/qqmltypecompiler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp
index 21846775a3..46b67d5983 100644
--- a/src/qml/compiler/qqmltypecompiler.cpp
+++ b/src/qml/compiler/qqmltypecompiler.cpp
@@ -1622,7 +1622,7 @@ bool QQmlComponentAndAliasResolver::resolveAliases()
QQmlPropertyData *targetProperty = resolver.property(property.toString());
if (!targetProperty || targetProperty->coreIndex > 0x0000FFFF) {
- recordError(p->aliasLocation, tr("Invalid alias location"));
+ recordError(p->aliasLocation, tr("Invalid alias target location: %1").arg(property.toString()));
return false;
}
@@ -1636,7 +1636,7 @@ bool QQmlComponentAndAliasResolver::resolveAliases()
if (!subProperty.isEmpty()) {
const QMetaObject *valueTypeMetaObject = QQmlValueTypeFactory::metaObjectForMetaType(type);
if (!valueTypeMetaObject) {
- recordError(p->aliasLocation, tr("Invalid alias location"));
+ recordError(p->aliasLocation, tr("Invalid alias target location: %1").arg(subProperty.toString()));
return false;
}
@@ -1645,7 +1645,7 @@ bool QQmlComponentAndAliasResolver::resolveAliases()
int valueTypeIndex =
valueTypeMetaObject->indexOfProperty(subProperty.toString().toUtf8().constData());
if (valueTypeIndex == -1) {
- recordError(p->aliasLocation, tr("Invalid alias location"));
+ recordError(p->aliasLocation, tr("Invalid alias target location: %1").arg(subProperty.toString()));
return false;
}
Q_ASSERT(valueTypeIndex <= 0x0000FFFF);