diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2021-06-23 12:21:28 +0200 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2021-06-24 11:47:32 +0200 |
commit | 31a33318baa57996d6ef8ec9c0b439eecdb38f83 (patch) | |
tree | fa45c9414d679a3dce9782bfdd93bbe2bd658115 /tools | |
parent | c761ec9cd51b907212e4c87d6ec0f875db061f32 (diff) |
qmllint: Hide deprecated options
We shouldn't keep advertising options we're deprecating anyway, just warn when they are still passed to qmllint.
Change-Id: Ibe53c51fc473719d021f912243921b6511ebd2f4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit b4d9bf79e1b3cf17d2a2473ae9901b9aec22f409)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmllint/main.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/tools/qmllint/main.cpp b/tools/qmllint/main.cpp index 69beb70264..178af18c1a 100644 --- a/tools/qmllint/main.cpp +++ b/tools/qmllint/main.cpp @@ -252,16 +252,16 @@ All warnings can be set to three levels: } // TODO: Remove after Qt 6.2 - QCommandLineOption disableCheckUnqualified(QStringList() << "no-unqualified-id", - QLatin1String("Don't warn about unqualified identifiers (deprecated, please use --unqualified disable instead)")); + QCommandLineOption disableCheckUnqualified(QStringList() << "no-unqualified-id"); + disableCheckUnqualified.setFlags(QCommandLineOption::HiddenFromHelp); parser.addOption(disableCheckUnqualified); - QCommandLineOption disableCheckWithStatement(QStringList() << "no-with-statement", - QLatin1String("Don't warn about with statements (deprecated, please use --with-statements disable instead)")); + QCommandLineOption disableCheckWithStatement(QStringList() << "no-with-statement"); + disableCheckWithStatement.setFlags(QCommandLineOption::HiddenFromHelp); parser.addOption(disableCheckWithStatement); - QCommandLineOption disableCheckInheritanceCycle(QStringList() << "no-inheritance-cycle", - QLatin1String("Don't warn about inheritance cycles (deprecated, please use --inheritance-cycle disable instead")); + QCommandLineOption disableCheckInheritanceCycle(QStringList() << "no-inheritance-cycle"); + disableCheckInheritanceCycle.setFlags(QCommandLineOption::HiddenFromHelp); parser.addOption(disableCheckInheritanceCycle); QCommandLineOption resourceOption( @@ -344,17 +344,19 @@ All warnings can be set to three levels: if (NoWarnUnqualified) { options[QStringLiteral("unqualified")].m_disabled = true; - qWarning() << "Warning: --no-unqualified-id is deprecated. See --help."; + qWarning() + << "Warning: --no-unqualified-id is deprecated. Use --unqualified disable instead."; } if (NoWarnWithStatement) { options[QStringLiteral("with")].m_disabled = true; - qWarning() << "Warning: --no-with-statement is deprecated. See --help."; + qWarning() << "Warning: --no-with-statement is deprecated. Use --with disable instead."; } if (NoWarnInheritanceCycle) { options[QStringLiteral("inheritance-cycle")].m_disabled = true; - qWarning() << "Warning: --no-inheritance-cycle is deprecated. See --help."; + qWarning() << "Warning: --no-inheritance-cycle is deprecated. Use --inheritance-cycle " + "disable instead."; } // use host qml import path as a sane default if not explicitly disabled |