QmlJS: Don't produce Qml type errors if plugins are imported.

Task-number: QTCREATORBUG-1021
Reviewed-by: Erik Verbruggen
This commit is contained in:
Christian Kamm
2010-04-07 10:43:09 +02:00
parent eae88f02ba
commit db2f91ef8f
5 changed files with 22 additions and 1 deletions

View File

@@ -176,6 +176,7 @@ Check::Check(Document::Ptr doc, const Snapshot &snapshot, const QStringList &imp
, _context(&_engine)
, _link(&_context, doc, snapshot, importPaths)
, _scopeBuilder(doc, &_context)
, _ignoreTypeErrors(_context.documentImportsPlugins(_doc.data()))
{
}
@@ -227,7 +228,8 @@ void Check::visitQmlObject(Node *ast, UiQualifiedId *typeId,
_scopeBuilder.push(ast);
if (! _context.lookupType(_doc.data(), typeId)) {
warning(typeId->identifierToken, tr(Messages::unknown_type));
if (! _ignoreTypeErrors)
error(typeId->identifierToken, tr(Messages::unknown_type));
// suppress subsequent errors about scope object lookup by clearing
// the scope object list
// ### todo: better way?