forked from qt-creator/qt-creator
QmlJS checks: Disable some checks when imports failed.
The important error in this case is on the import. Change-Id: I3a547ca7ac44a89aba6819ea80ec52185071408a Reviewed-on: http://codereview.qt-project.org/5879 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com> Sanity-Review: Christian Kamm <christian.d.kamm@nokia.com>
This commit is contained in:
@@ -2141,6 +2141,7 @@ void JSImportScope::processMembers(MemberProcessor *processor) const
|
||||
Imports::Imports(ValueOwner *valueOwner)
|
||||
: _typeScope(new TypeScope(this, valueOwner))
|
||||
, _jsImportScope(new JSImportScope(this, valueOwner))
|
||||
, _importFailed(false)
|
||||
{}
|
||||
|
||||
void Imports::append(const Import &import)
|
||||
@@ -2159,6 +2160,14 @@ void Imports::append(const Import &import)
|
||||
// not found, append
|
||||
_imports.append(import);
|
||||
}
|
||||
|
||||
if (!import.valid)
|
||||
_importFailed = true;
|
||||
}
|
||||
|
||||
void Imports::setImportFailed()
|
||||
{
|
||||
_importFailed = true;
|
||||
}
|
||||
|
||||
ImportInfo Imports::info(const QString &name, const Context *context) const
|
||||
@@ -2219,6 +2228,11 @@ QString Imports::nameForImportedObject(const ObjectValue *value, const Context *
|
||||
return QString();
|
||||
}
|
||||
|
||||
bool Imports::importFailed() const
|
||||
{
|
||||
return _importFailed;
|
||||
}
|
||||
|
||||
QList<Import> Imports::all() const
|
||||
{
|
||||
return _imports;
|
||||
|
||||
Reference in New Issue
Block a user