aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsimporter_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-10-05 08:51:05 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-10-06 08:19:23 +0200
commit2b8ec2eacbf96340ce95a2648450fde07bf3b5c3 (patch)
treefcd14125a2af765a4e3cee2e5d9926fe0d9e6b5b /src/qmlcompiler/qqmljsimporter_p.h
parentd6091eb768a898377d191143ac8b43b1b666a2d7 (diff)
QmlCompiler: Split importFileOrDirectory() in two
importing a file and importing a directory are really quite different things and the code paths inside the function were completely separate. We also don't have to create a map of ImportedTypes if we are only going to return a single one. Change-Id: Ifbb0caa70e9272dfde2d9f1cf5ed1b102e02f5cc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsimporter_p.h')
-rw-r--r--src/qmlcompiler/qqmljsimporter_p.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qmlcompiler/qqmljsimporter_p.h b/src/qmlcompiler/qqmljsimporter_p.h
index 43bc0296b8..245964a339 100644
--- a/src/qmlcompiler/qqmljsimporter_p.h
+++ b/src/qmlcompiler/qqmljsimporter_p.h
@@ -53,8 +53,10 @@ public:
ImportedTypes importBuiltins();
ImportedTypes importQmltypes(const QStringList &qmltypesFiles);
- ImportedTypes importFileOrDirectory(
- const QString &fileOrDirectory, const QString &prefix = QString());
+
+ QQmlJSScope::Ptr importFile(const QString &file);
+ ImportedTypes importDirectory(const QString &directory, const QString &prefix = QString());
+
ImportedTypes importModule(
const QString &module, const QString &prefix = QString(),
QTypeRevision version = QTypeRevision());