Clean up phrasing of --help-all and other help options

The options included by --help-all, although they are "specific to
Qt", are "specific" to all Qt applications, so - in the present
context, of QCommandLineParser - not specific at all. It's the options
described by -h that are specific, to the present command; the Qt
options are generic (in the present context).

So rework the documentation of --help-all in the function. It had, in
any case, an overly-complex first line, that descended into too much
detail. Back-port to 6.5 can't fix the string, so only fixes the docs.

Task-number: QTBUG-111228
Change-Id: I06da0af41be60e6e1b7616984001ddb9ca33aad6
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 526ce669ed41e3285fb13a1e3f394d7722db3ab3)
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
This commit is contained in:
Edward Welbourne 2023-05-03 14:39:07 +02:00
parent 39e9d2fda7
commit de7437ac98

View File

@ -389,13 +389,17 @@ QCommandLineOption QCommandLineParser::addVersionOption()
}
/*!
Adds the help option (\c{-h}, \c{--help} and \c{-?} on Windows)
as well as an option \c{--help-all} to include Qt-specific options in the output.
Adds help options to the command-line parser.
The options specified for this command-line are described by \c{-h} or
\c{--help}. On Windows, the alternative \c{-?} is also supported. The option
\c{--help-all} extends that to include generic Qt options, not defined by
this command, in the output.
These options are handled automatically by QCommandLineParser.
Remember to use setApplicationDescription to set the application description,
which will be displayed when this option is used.
Remember to use \c setApplicationDescription() to set the application
description, which will be displayed when this option is used.
Example:
\snippet code/src_corelib_tools_qcommandlineparser_main.cpp 0