7#include <QtCore/qtclasshelpermacros.h>
8#include <QtCore/qtconfigmacros.h>
9#include <QtCore/qtcoreexports.h>
10#include <QtCore/qcontainerfwd.h>
14#pragma qt_no_master_include
15#pragma qt_class(QtLogging)
36#if QT_DEPRECATED_SINCE(6, 7)
53 const char *
file =
nullptr;
54 const char *function =
nullptr;
66#if defined(Q_CC_MSVC_ONLY)
67# define QT_MESSAGE_LOGGER_NORETURN
69# define QT_MESSAGE_LOGGER_NORETURN Q_NORETURN
78 : context(
file,
line, function,
"default") {}
112#ifndef QT_NO_DEBUG_STREAM
138 QNoDebug noDebug() const noexcept;
145#undef QT_MESSAGE_LOGGER_NORETURN
147#if !defined(QT_MESSAGELOGCONTEXT) && !defined(QT_NO_MESSAGELOGCONTEXT)
148# if defined(QT_NO_DEBUG)
149# define QT_NO_MESSAGELOGCONTEXT
151# define QT_MESSAGELOGCONTEXT
155#ifdef QT_MESSAGELOGCONTEXT
156 #define QT_MESSAGELOG_FILE static_cast<const char *>(__FILE__)
157 #define QT_MESSAGELOG_LINE __LINE__
158 #define QT_MESSAGELOG_FUNC static_cast<const char *>(Q_FUNC_INFO)
160 #define QT_MESSAGELOG_FILE nullptr
161 #define QT_MESSAGELOG_LINE 0
162 #define QT_MESSAGELOG_FUNC nullptr
165#define qDebug QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC).debug
166#define qInfo QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC).info
167#define qWarning QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC).warning
168#define qCritical QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC).critical
169#define qFatal QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC).fatal
171#define QT_NO_QDEBUG_MACRO while (false) QMessageLogger().noDebug
173#if defined(QT_NO_DEBUG_OUTPUT)
175# define qDebug QT_NO_QDEBUG_MACRO
177#if defined(QT_NO_INFO_OUTPUT)
179# define qInfo QT_NO_QDEBUG_MACRO
181#if defined(QT_NO_WARNING_OUTPUT)
183# define qWarning QT_NO_QDEBUG_MACRO
constexpr QMessageLogContext() noexcept=default
static constexpr int CurrentVersion
QDebug debug(CategoryFunction catFunc) const
constexpr QMessageLogger()
Constructs a default QMessageLogger.
Q_DECL_COLD_FUNCTION QDebug warning(CategoryFunction catFunc) const
constexpr QMessageLogger(const char *file, int line, const char *function)
Constructs a QMessageLogger to record log messages for file at line in function.
Q_DECL_COLD_FUNCTION QDebug critical(CategoryFunction catFunc) const
QDebug info(CategoryFunction catFunc) const
constexpr QMessageLogger(const char *file, int line, const char *function, const char *category)
Constructs a QMessageLogger to record category messages for file at line in function.
Q_DECL_COLD_FUNCTION QDebug fatal(CategoryFunction catFunc) const
\macro QT_RESTRICTED_CAST_FROM_ASCII
const QLoggingCategory & category()
[1]
Combined button and popup list for selecting options.
class QT6_ONLY(Q_CORE_EXPORT) QChar
#define Q_DECL_ENUMERATOR_DEPRECATED_X(x)
#define Q_ATTRIBUTE_FORMAT_PRINTF(A, B)
#define Q_DECL_COLD_FUNCTION
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
Q_CORE_EXPORT Q_DECL_COLD_FUNCTION void qErrnoWarning(int code, const char *msg,...)
#define QT_MESSAGE_LOGGER_NORETURN
Q_DECL_COLD_FUNCTION Q_CORE_EXPORT QString qt_error_string(int errorCode=-1)
Q_CORE_EXPORT QString qFormatLogMessage(QtMsgType type, const QMessageLogContext &context, const QString &buf)
Q_CORE_EXPORT void qSetMessagePattern(const QString &messagePattern)
Q_CORE_EXPORT QtMessageHandler qInstallMessageHandler(QtMessageHandler)
Q_CORE_EXPORT void qt_message_output(QtMsgType, const QMessageLogContext &context, const QString &message)
void(* QtMessageHandler)(QtMsgType, const QMessageLogContext &, const QString &)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei const GLchar * message
QDebug warning(QAnyStringView fileName, int lineNumber)