diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-08-04 12:59:20 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-08-04 12:55:58 +0000 |
commit | 6cc4b9d6af6ed169cdb05a3925e50d353ab8c8a9 (patch) | |
tree | 90bb89a0c5e12e601ae339e10ef39c532dfbed44 /src/lib/corelib/language/itemreaderastvisitor.h | |
parent | 4d74073d1a16fdd8479a85f3ba0d297fb4a7c318 (diff) |
Allow importing JS collections also via the file name syntax.
The form "import MyCollection" was supported, the form "import
'mycollection' was not. That does not make any sense.
Change-Id: Id57b6749300bfa21cd1afcbc58d234e5c67a963d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/lib/corelib/language/itemreaderastvisitor.h')
-rw-r--r-- | src/lib/corelib/language/itemreaderastvisitor.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/corelib/language/itemreaderastvisitor.h b/src/lib/corelib/language/itemreaderastvisitor.h index cf85b852f..68c18c749 100644 --- a/src/lib/corelib/language/itemreaderastvisitor.h +++ b/src/lib/corelib/language/itemreaderastvisitor.h @@ -45,6 +45,7 @@ namespace Internal { class Item; class ItemPool; class ItemReaderVisitorState; +class JsImport; class Version; class ItemReaderASTVisitor : public QbsQmlJS::AST::Visitor @@ -81,6 +82,11 @@ private: static void replaceConditionScopes(const JSSourceValuePtr &value, Item *newScope); void handlePropertiesBlock(Item *item, const Item *block); void collectPrototypes(const QString &path, const QString &as); + + using JsImportsHash = QHash<QString, JsImport>; + void collectPrototypesAndJsCollections(const QString &path, const QString &as, + const CodeLocation &location, JsImportsHash &jsImports); + bool addPrototype(const QString &fileName, const QString &filePath, const QString &as, bool needsCheck); |