Add docs to the new QCommandLineParser::MessageType enum

As a drive-by: move the \since command in the showMessageAndExit() docs
to the right place.

Amends bad618606d64e943e3fa78e7d1dbc8e1fab55480.

Change-Id: I4e6e6d63929029879867624e4007941edfca9cd9
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 6692beace9bb5f461d71935e500e1c6ccfa97fd1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Ivan Solovev 2024-12-16 11:48:57 +01:00 committed by Qt Cherry-pick Bot
parent 6e3d2ad44f
commit e69e53de8e

View File

@ -531,6 +531,23 @@ static inline bool displayMessageBox()
#endif // Q_OS_WIN && !QT_BOOTSTRAPPED
/*!
\enum QCommandLineParser::MessageType
\since 6.9
The enum is used to specify the type of the message and how it will be shown
to the users.
\value InformationMessage Used to show information messages. The message
will be printed to \c {stdout}.
\value ErrorMessage Used to show error messages. The message will be printed
to \c {stderr}.
\sa showMessageAndExit()
*/
/*!
\since 6.9
Displays a \a message, and exits the application with the given \a exitCode.
The \a message will usually be printed directly to \c{stdout} or \c{stderr} according
@ -543,8 +560,7 @@ static inline bool displayMessageBox()
options (\c{--version} if addVersionOption was called and \c{--help} / \c{--help-all}
if addHelpOption was called).
\sa addVersionOption(), showHelp(), showVersion()
\since 6.9
\sa addVersionOption(), showHelp(), showVersion(), QCommandLineParser::MessageType
*/
Q_NORETURN void QCommandLineParser::showMessageAndExit(const QString &message, MessageType type, int exitCode)
{