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:
Christian Kamm
2011-09-29 11:48:13 +02:00
parent f3c78d3522
commit 038111c384
5 changed files with 59 additions and 20 deletions

View File

@@ -866,6 +866,8 @@ public:
ImportInfo info;
// uri imports: path to library, else empty
QString libraryPath;
// whether the import succeeded
bool valid;
};
class Imports;
@@ -904,9 +906,12 @@ public:
Imports(ValueOwner *valueOwner);
void append(const Import &import);
void setImportFailed();
ImportInfo info(const QString &name, const Context *context) const;
QString nameForImportedObject(const ObjectValue *value, const Context *context) const;
bool importFailed() const;
QList<Import> all() const;
const TypeScope *typeScope() const;
@@ -922,6 +927,7 @@ private:
QList<Import> _imports;
TypeScope *_typeScope;
JSImportScope *_jsImportScope;
bool _importFailed;
};
} // namespace QmlJS