diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-12-09 11:22:52 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-12-13 11:51:13 +0000 |
commit | 576fafd1e69429d7387e4c35f6d15fc42af6513e (patch) | |
tree | 0e06903fea45ab0b8cc858756fd8fb0307cf0d32 /src/qmlcompiler/qqmljscompiler.cpp | |
parent | 22f4306283d10e9aa5d6acb3e33ab2a8a397bb4c (diff) | |
download | qtdeclarative-576fafd1e69429d7387e4c35f6d15fc42af6513e.tar.gz |
Pass qmldir to qmlcachegen, qmllint and qmltc, not the qmltypes file
The tools will still grudgingly accept qmltypes files being passed via
the -i option. We generally expect qmldir files, though. Ignoring the
qmldir file and importing the qmltypes directly, ignores qmldir imports,
dependencies and other component entries. This leads to unresolvable
types.
[ChangeLog][QML Tooling] qmllint expects qmldir files, not qmltypes
files to be passed via the -i option now. This enables it to see the
imports and dependencies of the module being imported. For backwards
compatibility it still accepts qmltypes files, with a warning.
Pick-to: 6.3
Fixes: QTBUG-99043
Change-Id: I5ed32d7e78df1e604aaf1bfa2ebda09d5d57b628
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljscompiler.cpp')
-rw-r--r-- | src/qmlcompiler/qqmljscompiler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qmlcompiler/qqmljscompiler.cpp b/src/qmlcompiler/qqmljscompiler.cpp index bfb434aada..79fa6a69ff 100644 --- a/src/qmlcompiler/qqmljscompiler.cpp +++ b/src/qmlcompiler/qqmljscompiler.cpp @@ -620,11 +620,11 @@ bool qSaveQmlJSUnitAsCpp(const QString &inputFileName, const QString &outputFile } QQmlJSAotCompiler::QQmlJSAotCompiler( - QQmlJSImporter *importer, const QString &resourcePath, const QStringList &qmltypesFiles, + QQmlJSImporter *importer, const QString &resourcePath, const QStringList &qmldirFiles, QQmlJSLogger *logger) : m_typeResolver(importer) , m_resourcePath(resourcePath) - , m_qmltypesFiles(qmltypesFiles) + , m_qmldirFiles(qmldirFiles) , m_importer(importer) , m_logger(logger) { @@ -642,7 +642,7 @@ void QQmlJSAotCompiler::setDocument( m_entireSourceCodeLines = irDocument->code.split(u'\n'); QQmlJSImportVisitor visitor(m_importer, m_logger, resourcePathInfo.canonicalPath() + u'/', - m_qmltypesFiles); + m_qmldirFiles); m_typeResolver.init(&visitor, irDocument->program); } |