aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmllint/main.cpp
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2021-07-06 13:26:23 +0200
committerMaximilian Goldstein <max.goldstein@qt.io>2021-07-07 14:03:24 +0200
commit44c46c15c0f34cffca855a67bd3a393f03122038 (patch)
tree392b9c12d6e6f79495d8e0b9a997c3eb7171c88b /tools/qmllint/main.cpp
parent67894892da4c4f9985307e8cfc76aad766de88ac (diff)
qqmljstypepropagator: Use logger system
In order to properly integrate the type propagator into qmllint we need to use the logging system instead of qWarning(). Change-Id: Ie9840066f8afa3d7f8a63a69444b6dc20c41a706 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tools/qmllint/main.cpp')
-rw-r--r--tools/qmllint/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/qmllint/main.cpp b/tools/qmllint/main.cpp
index 0e2a479596..7f28c4d9cb 100644
--- a/tools/qmllint/main.cpp
+++ b/tools/qmllint/main.cpp
@@ -181,7 +181,7 @@ static bool lint_file(const QString &filename, const bool silent, QJsonArray *js
parser.rootNode()->accept(&v);
success = v.check();
- Codegen codegen { &importer, resourceFile, qmltypesFiles, &v.logger(), code };
+ Codegen codegen { &importer, filename, qmltypesFiles, &v.logger(), code };
QQmlJSSaveFunction saveFunction = [](const QV4::CompiledData::SaveableUnitPointer &,
const QQmlJSAotFunctionMap &,
@@ -193,6 +193,8 @@ static bool lint_file(const QString &filename, const bool silent, QJsonArray *js
qCompileQmlFile(filename, saveFunction, &codegen, &error);
+ success &= !v.logger().hasWarnings() && !v.logger().hasErrors();
+
if (json) {
for (const auto &error : v.logger().errors())
addJsonWarning(error);