summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-04-08 01:12:16 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-04-08 01:12:16 (GMT)
commit2f163cda817a3318c293e9a9b9e66fb20f4c990c (patch)
treed23dc5365879c40545ea381effccf28422b93830 /src/declarative/qml
parent962c1e995992d72a1b947d46fb14ae006582bc6e (diff)
downloadQt-2f163cda817a3318c293e9a9b9e66fb20f4c990c.zip
Qt-2f163cda817a3318c293e9a9b9e66fb20f4c990c.tar.gz
Qt-2f163cda817a3318c293e9a9b9e66fb20f4c990c.tar.bz2
Test actual error messages. Fix error messages. Test module-not-available error.
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qdeclarativecompositetypemanager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativecompositetypemanager.cpp b/src/declarative/qml/qdeclarativecompositetypemanager.cpp
index 55723ea..61978a4 100644
--- a/src/declarative/qml/qdeclarativecompositetypemanager.cpp
+++ b/src/declarative/qml/qdeclarativecompositetypemanager.cpp
@@ -633,10 +633,12 @@ int QDeclarativeCompositeTypeManager::resolveTypes(QDeclarativeCompositeTypeData
// - type with unknown namespace (UnknownNamespace.SomeType {})
QDeclarativeError error;
error.setUrl(unit->imports.baseUrl());
+ QString userTypeName = QString::fromUtf8(typeName);
+ userTypeName.replace('/','.');
if (typeNamespace)
- error.setDescription(tr("Namespace %1 cannot be used as a type").arg(QString::fromUtf8(typeName)));
+ error.setDescription(tr("Namespace %1 cannot be used as a type").arg(userTypeName));
else
- error.setDescription(tr("%1 is not a type").arg(QString::fromUtf8(typeName)));
+ error.setDescription(tr("%1 is not a type").arg(userTypeName));
if (!parserRef->refObjects.isEmpty()) {
QDeclarativeParser::Object *obj = parserRef->refObjects.first();
error.setLine(obj->location.start.line);