diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-09-29 10:36:30 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-09-29 13:39:42 +0200 |
commit | a960c2b53abc94698f498cf6c84eeb471431e337 (patch) | |
tree | 6911026319451fdf951edfbd7b5f0a1c9bd5841e /tools/qmllint | |
parent | abb9d7d793b900cfc75812e495b99cfdf6ee98bf (diff) |
Pass file name and code to the qmllint codegen logger
We need the file name in order to see when the file we're examining is a
qmltypes file.
Change-Id: I72b6c3fe63e721b2b2a116fcafcb55e45b23ae39
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Diffstat (limited to 'tools/qmllint')
-rw-r--r-- | tools/qmllint/codegen.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/qmllint/codegen.cpp b/tools/qmllint/codegen.cpp index 0480b96f26..fc05308d9c 100644 --- a/tools/qmllint/codegen.cpp +++ b/tools/qmllint/codegen.cpp @@ -56,12 +56,12 @@ void Codegen::setDocument(QmlIR::JSCodeGen *codegen, QmlIR::Document *document) // dynamically (QTBUG-95530). Currently this has no other side effects. Re-evaluate once // that changes. QQmlJSTypeResolver::Indirect, QQmlJSTypeResolver::Static, m_logger); - // TODO: using emptyLogger for visitor actually hides potential issues but + // TODO: using silentLogger for visitor actually hides potential issues but // using m_logger instead fails some tests, so for now let's leave the old // behavior for consistency. the proper fix is anyway to remove this visitor // and use FindWarningsVisitor instead. - QQmlJSLogger emptyLogger(QString(), QString(), /* silent */ true); - QQmlJSImportVisitor visitor(m_importer, &emptyLogger, + QQmlJSLogger silentLogger(m_fileName, document->code, /* silent */ true); + QQmlJSImportVisitor visitor(m_importer, &silentLogger, QQmlJSImportVisitor::implicitImportDirectory( m_fileName, m_importer->resourceFileMapper()), m_qmltypesFiles); |