aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language/itemreaderastvisitor.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-08-04 12:59:20 +0200
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-08-04 12:55:58 +0000
commit6cc4b9d6af6ed169cdb05a3925e50d353ab8c8a9 (patch)
tree90bb89a0c5e12e601ae339e10ef39c532dfbed44 /src/lib/corelib/language/itemreaderastvisitor.h
parent4d74073d1a16fdd8479a85f3ba0d297fb4a7c318 (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.h6
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);