From 226738227304f16c1749a7937d97527a4cf5b57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Fri, 17 May 2024 09:37:20 +0200 Subject: [PATCH] Doc: Hint about QtMsgType order You could get the idea that the underlying int value is indicative of the severity. Make it more explicit that the order in the text is the correct one, and reorder for Qt 7. While at it, remove mentioning of Qt 5.5. Fixes: QTBUG-102347 Change-Id: I5d1b46afb37e50baa209a06c192a943980ca774b Reviewed-by: Edward Welbourne (cherry picked from commit 469367dc08654e02dae39162750fce7fa39d906d) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/global/qlogging.cpp | 4 +--- src/corelib/global/qlogging.h | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 449b8a1eea9..a511af32ee3 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -2517,7 +2517,7 @@ QMessageLogContext &QMessageLogContext::copyContextFrom(const QMessageLogContext This enum describes the messages that can be sent to a message handler (QtMessageHandler). You can use the enum to identify and associate the various message types with the appropriate - actions. + actions. Its values are, in order of increasing severity: \value QtDebugMsg A message generated by the qDebug() function. @@ -2531,8 +2531,6 @@ QMessageLogContext &QMessageLogContext::copyContextFrom(const QMessageLogContext A message generated by the qFatal() function. \omitvalue QtSystemMsg - \c QtInfoMsg was added in Qt 5.5. - \sa QtMessageHandler, qInstallMessageHandler() */ diff --git a/src/corelib/global/qlogging.h b/src/corelib/global/qlogging.h index de822672184..050ffc51645 100644 --- a/src/corelib/global/qlogging.h +++ b/src/corelib/global/qlogging.h @@ -28,10 +28,11 @@ class QNoDebug; enum QtMsgType { QtDebugMsg, + QT7_ONLY(QtInfoMsg,) QtWarningMsg, QtCriticalMsg, QtFatalMsg, - QtInfoMsg, + QT6_ONLY(QtInfoMsg,) #if QT_DEPRECATED_SINCE(6, 7) QtSystemMsg Q_DECL_ENUMERATOR_DEPRECATED_X("Use QtCriticalMsg instead.") = QtCriticalMsg #endif