aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsimporter_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-11-23 17:20:47 +0100
committerUlf Hermann <ulf.hermann@qt.io>2022-11-25 00:04:02 +0100
commit6e640a0218b9860f7af79494d87b64690805a1ed (patch)
treef93a52a0382737d0d5baf30df44db930b6eb4111 /src/qmlcompiler/qqmljsimporter_p.h
parent60a18929027cca06fb81d007e81c056465507946 (diff)
QmlCompiler: Store imported types in a QList
The same type can be exported multiple times with different attributes, even in the same module. This requires us to fix directory imports as qmllint otherwise complains about SegFault.bad.qml and SegFault.qml being the same type (which they obviously aren't). Task-number: QTCREATORBUG-27590 Change-Id: I295d927b9a07acbb715055a6883ac44b50129c2d Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/qmlcompiler/qqmljsimporter_p.h')
-rw-r--r--src/qmlcompiler/qqmljsimporter_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qmlcompiler/qqmljsimporter_p.h b/src/qmlcompiler/qqmljsimporter_p.h
index 017917d3cf..792e26a291 100644
--- a/src/qmlcompiler/qqmljsimporter_p.h
+++ b/src/qmlcompiler/qqmljsimporter_p.h
@@ -115,7 +115,7 @@ private:
bool isStaticModule = false;
bool isSystemModule = false;
- QHash<QString, QQmlJSExportedScope> objects;
+ QList<QQmlJSExportedScope> objects;
QHash<QString, QQmlJSExportedScope> scripts;
QList<QQmlDirParser::Import> imports;
QList<QQmlDirParser::Import> dependencies;
@@ -130,7 +130,7 @@ private:
void importDependencies(const QQmlJSImporter::Import &import, AvailableTypes *types,
const QString &prefix = QString(),
QTypeRevision version = QTypeRevision(), bool isDependency = false);
- void readQmltypes(const QString &filename, QHash<QString, QQmlJSExportedScope> *objects,
+ void readQmltypes(const QString &filename, QList<QQmlJSExportedScope> *objects,
QList<QQmlDirParser::Import> *dependencies);
Import readQmldir(const QString &dirname);
Import readDirectory(const QString &directory);