diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2022-01-10 14:52:30 +0100 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2022-01-17 12:35:54 +0100 |
commit | f19582f630b7af1498cf4d83c2ecb339d51f6ffa (patch) | |
tree | 2259f2bfc3131740d58743e256b0521f2f1f9ba0 /tools/qmllint/main.cpp | |
parent | 6e4dd74bbcb6c67229c87c3113c006df4f11847a (diff) |
qmllint: Enable compiler warnings for pragma Strict
If a file sets pragma Strict, it expects to be fully compiler
compliant, so let's enable the warnings for that by default.
Fixes: QTBUG-97081
Change-Id: I0b388f64d99846ee0c03e24397b3a997d4b0173b
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tools/qmllint/main.cpp')
-rw-r--r-- | tools/qmllint/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/qmllint/main.cpp b/tools/qmllint/main.cpp index 6d4de2df09..c68e1b21b1 100644 --- a/tools/qmllint/main.cpp +++ b/tools/qmllint/main.cpp @@ -167,6 +167,12 @@ 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(); + + // Do not try to set the levels if it's due to a default config option. + // This way we can tell which options have actually been overwritten by the user. + if (option.levelToString() == value && !parser.isSet(key)) + continue; + if (!option.setLevel(value)) { qWarning() << "Invalid logging level" << value << "provided for" << it.key() << "(allowed are: disable, info, warning)"; |