From bee606b0916e58de4a6783d2c96a0ed70fe914ed Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Fri, 16 Sep 2022 16:14:59 +0200 Subject: [PATCH] Extract overview page for QtLogging header from QtGlobal docs Task-number: QTBUG-106154 Change-Id: I7a60225bc8d848f52c3f51f8f4d0a360cb4ea744 Reviewed-by: Thiago Macieira --- src/corelib/global/qlogging.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 01ca949204b..1c469d28fb8 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -129,6 +129,36 @@ QT_BEGIN_NAMESPACE using namespace Qt::StringLiterals; +/*! + \headerfile + \inmodule QtCore + \title Qt Logging Types + + \brief The header file defines Qt logging types, functions + and macros. + + The header file contains several types, functions and + macros for logging. + + The QtMsgType enum identifies the various messages that can be generated + and sent to a Qt message handler; QtMessageHandler is a type definition for + a pointer to a function with the signature + \c {void myMessageHandler(QtMsgType, const QMessageLogContext &, const char *)}. + qInstallMessageHandler() function can be used to install the given + QtMessageHandler. QMessageLogContext class contains the line, file, and + function the message was logged at. This information is created by the + QMessageLogger class. + + also contains functions that generate messages from the + given string argument: qDebug(), qInfo(), qWarning(), qCritical(), + and qFatal(). These functions call the message handler + with the given message. + + Example: + + \snippet code/src_corelib_global_qglobal.cpp 4 +*/ + #if !defined(Q_CC_MSVC) Q_NORETURN #endif