diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2021-07-01 17:30:42 +0200 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2021-07-02 17:25:21 +0200 |
commit | 3b3d0c6f3c02dff9a7f911e4d541c9cc7527d5b8 (patch) | |
tree | b513ba563936231dc63e8b5c0841732ac1103d05 /tools/qmllint/main.cpp | |
parent | 7fbc257a5a187ca752165e28401d77effb945710 (diff) |
qmllint: Implement severity levels
qmllint now supports logging levels of different severities. Still lacking a good way to toggle the verbosity more granularly though (i.e. disabling only info messages while still receiving the rest).
Change-Id: I71abddcdf1adf60315a87d776af8085acf7aeffe
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'tools/qmllint/main.cpp')
-rw-r--r-- | tools/qmllint/main.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/qmllint/main.cpp b/tools/qmllint/main.cpp index 97a383eb86..bfd990fe5b 100644 --- a/tools/qmllint/main.cpp +++ b/tools/qmllint/main.cpp @@ -172,7 +172,7 @@ static bool lint_file(const QString &filename, const bool silent, QJsonArray *js engine.comments(), filename, silent || json }; for (auto it = options.cbegin(); it != options.cend(); ++it) { - v.logger().setCategoryDisabled(it.value().m_category, it.value().m_disabled); + v.logger().setCategoryError(it.value().m_category, it.value().m_error); v.logger().setCategoryLevel(it.value().m_category, it.value().m_level); } @@ -304,7 +304,6 @@ All warnings can be set to three levels: const QString value = parser.isSet(key) ? parser.value(key) : settings.value(settingsName).toString(); auto &option = it.value(); - if (!option.setLevel(value)) { qWarning() << "Invalid logging level" << value << "provided for" << it.key() << "(allowed are: disable, info, warning)"; |