Use [[noreturn]] on QCommandLineParser::showMessageAndExit()
... instead of Q_NORETURN, as the attribute should be unconditionally available since C++11. Amends bad618606d64e943e3fa78e7d1dbc8e1fab55480. Found in Qt 6.9 API review. Change-Id: Ia008acf0777867f551c7e1cc3423f29f8ed6fbed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 8472004a895fa98e68f6f3ff134720904a00c150) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
cf9e8434eb
commit
652fe10689
@ -562,7 +562,7 @@ static inline bool displayMessageBox()
|
|||||||
|
|
||||||
\sa addVersionOption(), showHelp(), showVersion(), QCommandLineParser::MessageType
|
\sa addVersionOption(), showHelp(), showVersion(), QCommandLineParser::MessageType
|
||||||
*/
|
*/
|
||||||
Q_NORETURN void QCommandLineParser::showMessageAndExit(MessageType type, const QString &message, int exitCode)
|
[[noreturn]] void QCommandLineParser::showMessageAndExit(MessageType type, const QString &message, int exitCode)
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_WIN) && !defined(QT_BOOTSTRAPPED)
|
#if defined(Q_OS_WIN) && !defined(QT_BOOTSTRAPPED)
|
||||||
if (displayMessageBox()) {
|
if (displayMessageBox()) {
|
||||||
|
@ -71,7 +71,7 @@ public:
|
|||||||
InformationMessage,
|
InformationMessage,
|
||||||
ErrorMessage,
|
ErrorMessage,
|
||||||
};
|
};
|
||||||
Q_NORETURN static void showMessageAndExit(MessageType type, const QString &message, int exitCode = 0);
|
[[noreturn]] static void showMessageAndExit(MessageType type, const QString &message, int exitCode = 0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(QCommandLineParser)
|
Q_DISABLE_COPY(QCommandLineParser)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user