diff options
| author | Ivan Solovev <ivan.solovev@qt.io> | 2024-12-16 11:48:57 +0100 |
|---|---|---|
| committer | Ivan Solovev <ivan.solovev@qt.io> | 2024-12-17 14:36:40 +0100 |
| commit | 6692beace9bb5f461d71935e500e1c6ccfa97fd1 (patch) | |
| tree | 62d599fe03e347f663838822a093a4cb3aac4c23 /src/corelib/tools/qcommandlineparser.cpp | |
| parent | 14cc2591ac06dbcee01c2b110e014db2993d7a1e (diff) | |
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.
Pick-to: 6.9
Change-Id: I4e6e6d63929029879867624e4007941edfca9cd9
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/corelib/tools/qcommandlineparser.cpp')
| -rw-r--r-- | src/corelib/tools/qcommandlineparser.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/corelib/tools/qcommandlineparser.cpp b/src/corelib/tools/qcommandlineparser.cpp index 5aa1cc9d697..0f421d57438 100644 --- a/src/corelib/tools/qcommandlineparser.cpp +++ b/src/corelib/tools/qcommandlineparser.cpp @@ -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) { |
