QmlJS: Improve import error messages.

Change-Id: Ief305b787fbc4577acfdec41083bc72e178db46d
Reviewed-on: http://codereview.qt-project.org/4537
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
Christian Kamm
2011-09-09 13:56:41 +02:00
parent 16b4a6fe73
commit 43a6a6d58c
2 changed files with 33 additions and 18 deletions

View File

@@ -357,7 +357,12 @@ Import Link::importNonFile(Document::Ptr doc, const ImportInfo &importInfo)
if (!importFound && importInfo.ast()) {
error(doc, locationFromRange(importInfo.ast()->firstSourceLocation(),
importInfo.ast()->lastSourceLocation()),
tr("package not found"));
tr("QML module not found\n\n"
"Import paths:\n"
"%1\n\n"
"For qmake projects, use the QML_IMPORT_PATH variable to add import paths.\n"
"For qmlproject projects, use the importPaths property to add import paths.").arg(
d->importPaths.join(QLatin1String("\n"))));
}
return import;
@@ -403,7 +408,7 @@ bool Link::importLibrary(Document::Ptr doc,
}
if (errorLoc.isValid()) {
warning(doc, errorLoc,
tr("Library contains C++ plugins, type dump is in progress."));
tr("QML module contains C++ plugins, currently reading type information..."));
}
} else if (libraryInfo.pluginTypeInfoStatus() == LibraryInfo::DumpError
|| libraryInfo.pluginTypeInfoStatus() == LibraryInfo::TypeInfoFileError) {