aboutsummaryrefslogtreecommitdiffstats
path: root/tools/shared
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-09-29 16:26:07 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-10-02 15:32:21 +0200
commit4bb53fd1086e5e67391c7bd328ab5083ed83be68 (patch)
tree0776d2548976137eda8b79a974290ad466565728 /tools/shared
parent48426aa705cb7ed88489200864c2fc0143058671 (diff)
tools: Remove QmlJSImporter::m_currentDir
It was only used to make paths passed to importFileOrDirectory absolute. We can do that before passing them. Change-Id: I0798d38080596fc6eb314259e81702b81a7743dd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools/shared')
-rw-r--r--tools/shared/qmljsimporter.cpp3
-rw-r--r--tools/shared/qmljsimporter.h4
2 files changed, 1 insertions, 6 deletions
diff --git a/tools/shared/qmljsimporter.cpp b/tools/shared/qmljsimporter.cpp
index 28b7e7950f..b061b96a53 100644
--- a/tools/shared/qmljsimporter.cpp
+++ b/tools/shared/qmljsimporter.cpp
@@ -287,9 +287,6 @@ QmlJSImporter::ImportedTypes QmlJSImporter::importFileOrDirectory(
QString name = fileOrDirectory;
- if (QFileInfo(name).isRelative())
- name = QDir(m_currentDir).filePath(name);
-
QFileInfo fileInfo(name);
if (fileInfo.isFile()) {
ScopeTree::Ptr scope(localFile2ScopeTree(fileInfo.canonicalFilePath()));
diff --git a/tools/shared/qmljsimporter.h b/tools/shared/qmljsimporter.h
index 44536acc51..170b211175 100644
--- a/tools/shared/qmljsimporter.h
+++ b/tools/shared/qmljsimporter.h
@@ -57,8 +57,7 @@ public:
QHash<QString, ScopeTree::Ptr> importedQmlNames;
};
- QmlJSImporter(const QString &currentDir, const QStringList &importPaths) :
- m_currentDir(currentDir), m_importPaths(importPaths) {}
+ QmlJSImporter(const QStringList &importPaths) : m_importPaths(importPaths) {}
ImportedTypes importBaseQmlTypes(const QStringList &qmltypesFiles);
ImportedTypes importFileOrDirectory(
@@ -95,7 +94,6 @@ private:
Import readQmldir(const QString &dirname);
ScopeTree::Ptr localFile2ScopeTree(const QString &filePath);
- QString m_currentDir;
QStringList m_importPaths;
QHash<QPair<QString, QTypeRevision>, Import> m_seenImports;
QHash<QString, ScopeTree::Ptr> m_importedFiles;