52 #include <QtCore/private/qlocking_p.h>
54 #ifndef QT_BOOTSTRAPPED
60 #include "private/qloggingregistry_p.h"
61 #include "private/qcoreapplication_p.h"
62 #include "private/qsimd_p.h"
63 #include <qtcore_tracepoints_p.h>
72 #include <sys/slog2.h>
74 #if __has_include(<paths.h>)
79 #include <android/log.h>
83 #include <QtCore/private/qcore_mac_p.h>
86 #if QT_CONFIG(journald)
87 # define SD_JOURNAL_SUPPRESS_LOCATION
88 # include <systemd/sd-journal.h>
95 # include <sys/types.h>
96 # include <sys/stat.h>
98 # include "private/qcore_unix_p.h"
102 #include <emscripten/emscripten.h>
106 extern char *__progname;
109 #ifndef QT_BOOTSTRAPPED
110 #if __has_include(<cxxabi.h>) && QT_CONFIG(backtrace) && QT_CONFIG(regularexpression)
112 # include BACKTRACE_HEADER
114 # define QLOGGING_HAVE_BACKTRACE
117 #if defined(Q_OS_LINUX) && (defined(__GLIBC__) || __has_include(<sys/syscall.h>))
118 # include <sys/syscall.h>
120 # if defined(Q_OS_ANDROID) && !defined(SYS_gettid)
121 # define SYS_gettid __NR_gettid
124 static long qt_gettid()
128 return syscall(SYS_gettid);
130 #elif defined(Q_OS_DARWIN)
131 # include <pthread.h>
132 static int qt_gettid()
136 pthread_threadid_np(
NULL, &tid);
139 #elif defined(Q_OS_FREEBSD_KERNEL) && defined(__FreeBSD_version) && __FreeBSD_version >= 900031
140 # include <pthread_np.h>
141 static int qt_gettid()
143 return pthread_getthreadid_np();
146 static QT_PREPEND_NAMESPACE(
qint64) qt_gettid()
163 #if !defined(Q_CC_MSVC)
170 static int checked_var_value(
const char *varname)
190 static QAtomicInt fatalCriticals = checked_var_value(
"QT_FATAL_CRITICALS");
198 static QAtomicInt fatalWarnings = checked_var_value(
"QT_FATAL_WARNINGS");
208 static bool isDefaultCategory(
const char *
category)
219 static bool systemHasStderr()
244 static bool stderrHasConsoleAttached()
246 static const bool stderrHasConsoleAttached = []() ->
bool {
247 if (!systemHasStderr())
250 if (qEnvironmentVariableIntValue(
"QT_LOGGING_TO_CONSOLE")) {
251 fprintf(stderr,
"warning: Environment variable QT_LOGGING_TO_CONSOLE is deprecated, use\n"
252 "QT_ASSUME_STDERR_HAS_CONSOLE and/or QT_FORCE_STDERR_LOGGING instead.\n");
256 if (qEnvironmentVariableIntValue(
"QT_ASSUME_STDERR_HAS_CONSOLE"))
259 #if defined(Q_OS_WIN)
260 return GetConsoleWindow();
261 #elif defined(Q_OS_UNIX)
263 # define _PATH_TTY "/dev/tty"
268 if ((ttyDevice = qt_safe_open(_PATH_TTY, O_RDONLY)) >= 0) {
269 qt_safe_close(ttyDevice);
271 }
else if (errno == ENOENT || errno == EPERM || errno == ENXIO) {
282 return stderrHasConsoleAttached;
299 static bool forceStderrLogging = qEnvironmentVariableIntValue(
"QT_FORCE_STDERR_LOGGING");
300 return forceStderrLogging || stderrHasConsoleAttached();
342 #if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)
343 static inline void convert_to_wchar_t_elided(
wchar_t *
d,
size_t space,
const char *
s) noexcept
346 if (
len + 1 > space) {
347 const size_t skip =
len - space + 4;
350 for (
int i = 0;
i < 3; ++
i)
455 const char *
msg, ...)
const
474 #ifndef QT_NO_DEBUG_STREAM
499 dbg.stream->message_output =
false;
516 return debug((*catFunc)());
566 const char *
msg, ...)
const
585 #ifndef QT_NO_DEBUG_STREAM
611 dbg.stream->message_output =
false;
628 return info((*catFunc)());
684 const char *
msg, ...)
const
703 #ifndef QT_NO_DEBUG_STREAM
726 dbg.stream->message_output =
false;
743 return warning((*catFunc)());
800 const char *
msg, ...)
const
819 #ifndef QT_NO_DEBUG_STREAM
843 dbg.stream->message_output =
false;
860 return critical((*catFunc)());
901 if (
info.endsWith(
']') && !(
info.startsWith(
'+') ||
info.startsWith(
'-'))) {
909 static const char operator_call[] =
"operator()";
910 static const char operator_lessThan[] =
"operator<";
911 static const char operator_greaterThan[] =
"operator>";
912 static const char operator_lessThanEqual[] =
"operator<=";
913 static const char operator_greaterThanEqual[] =
"operator>=";
916 info.replace(
"operator ",
"operator");
930 while (
pos && parencount) {
943 if (
info.indexOf(operator_call) ==
pos - (
int)
strlen(operator_call))
959 int templatecount = 0;
966 if (
info.indexOf(operator_call) ==
pos - (
int)
strlen(operator_call) + 1)
970 if (
info.indexOf(operator_lessThan) ==
pos - (
int)
strlen(operator_lessThan) + 1)
974 if (
info.indexOf(operator_greaterThan) ==
pos - (
int)
strlen(operator_greaterThan) + 1)
978 int operatorLength = (int)
strlen(operator_lessThanEqual);
979 if (
info.indexOf(operator_lessThanEqual) ==
pos - operatorLength + 1)
981 else if (
info.indexOf(operator_greaterThanEqual) ==
pos - operatorLength + 1)
991 if (parencount < 0 || templatecount < 0)
1003 else if (
c ==
' ' && templatecount == 0 && parencount == 0)
1011 while ((
info.at(0) ==
'*')
1012 || (
info.at(0) ==
'&'))
1017 while ((
pos =
info.lastIndexOf(
'>')) != -1) {
1018 if (!
info.contains(
'<'))
1025 while (
pos && templatecount) {
1041 static const char categoryTokenC[] =
"%{category}";
1042 static const char typeTokenC[] =
"%{type}";
1043 static const char messageTokenC[] =
"%{message}";
1044 static const char fileTokenC[] =
"%{file}";
1045 static const char lineTokenC[] =
"%{line}";
1046 static const char functionTokenC[] =
"%{function}";
1047 static const char pidTokenC[] =
"%{pid}";
1048 static const char appnameTokenC[] =
"%{appname}";
1049 static const char threadidTokenC[] =
"%{threadid}";
1050 static const char qthreadptrTokenC[] =
"%{qthreadptr}";
1051 static const char timeTokenC[] =
"%{time";
1052 static const char backtraceTokenC[] =
"%{backtrace";
1053 static const char ifCategoryTokenC[] =
"%{if-category}";
1054 static const char ifDebugTokenC[] =
"%{if-debug}";
1055 static const char ifInfoTokenC[] =
"%{if-info}";
1056 static const char ifWarningTokenC[] =
"%{if-warning}";
1057 static const char ifCriticalTokenC[] =
"%{if-critical}";
1058 static const char ifFatalTokenC[] =
"%{if-fatal}";
1059 static const char endifTokenC[] =
"%{endif}";
1060 static const char emptyTokenC[] =
"";
1062 static const char defaultPattern[] =
"%{if-category}%{category}: %{endif}%{message}";
1072 std::unique_ptr<std::unique_ptr<const char[]>[]>
literals;
1075 #ifndef QT_BOOTSTRAPPED
1078 #ifdef QLOGGING_HAVE_BACKTRACE
1090 #ifdef QLOGGING_HAVE_BACKTRACE
1098 #ifndef QT_BOOTSTRAPPED
1104 fromEnvironment =
false;
1106 setPattern(envPattern);
1107 fromEnvironment =
true;
1116 #ifdef QLOGGING_HAVE_BACKTRACE
1117 backtraceArgs.clear();
1123 bool inPlaceholder =
false;
1127 && !inPlaceholder) {
1135 inPlaceholder =
true;
1145 inPlaceholder =
false;
1152 std::vector<std::unique_ptr<const char[]>> literalsVar;
1153 tokens.reset(
new const char *[lexemes.
size() + 1]);
1154 tokens[lexemes.
size()] =
nullptr;
1156 bool nestedIfError =
false;
1160 for (
int i = 0;
i < lexemes.
size(); ++
i) {
1166 tokens[
i] = typeTokenC;
1168 tokens[
i] = categoryTokenC;
1170 tokens[
i] = messageTokenC;
1172 tokens[
i] = fileTokenC;
1174 tokens[
i] = lineTokenC;
1176 tokens[
i] = functionTokenC;
1178 tokens[
i] = pidTokenC;
1180 tokens[
i] = appnameTokenC;
1182 tokens[
i] = threadidTokenC;
1184 tokens[
i] = qthreadptrTokenC;
1186 tokens[
i] = timeTokenC;
1189 timeArgs.
append(lexeme.
mid(spaceIdx + 1, lexeme.
length() - spaceIdx - 2));
1193 #ifdef QLOGGING_HAVE_BACKTRACE
1194 tokens[
i] = backtraceTokenC;
1196 int backtraceDepth = 5;
1203 error +=
QLatin1String(
"QT_MESSAGE_PATTERN: %{backtrace} depth must be a number greater than 0\n");
1205 backtraceDepth =
depth;
1207 m = separatorRx.
match(lexeme);
1209 backtraceSeparator =
m.captured(1);
1213 backtraceArgs.
append(backtraceParams);
1215 error +=
QLatin1String(
"QT_MESSAGE_PATTERN: %{backtrace} is not supported by this Qt build\n");
1220 #define IF_TOKEN(LEVEL) \
1221 else if (lexeme == QLatin1String(LEVEL)) { \
1223 nestedIfError = true; \
1224 tokens[i] = LEVEL; \
1235 tokens[
i] = endifTokenC;
1236 if (!inIf && !nestedIfError)
1240 tokens[
i] = emptyTokenC;
1245 char *literal =
new char[lexeme.
size() + 1];
1247 literal[lexeme.
size()] =
'\0';
1248 literalsVar.emplace_back(literal);
1249 tokens[
i] = literal;
1257 if (!
error.isEmpty())
1258 qt_message_print(
error);
1260 literals.reset(
new std::unique_ptr<
const char[]>[literalsVar.size() + 1]);
1261 std::move(literalsVar.begin(), literalsVar.end(), &literals[0]);
1264 #if defined(QLOGGING_HAVE_BACKTRACE) && !defined(QT_BOOTSTRAPPED)
1277 static constexpr
int TypicalBacktraceFrameCount = 8;
1279 #if ((defined(Q_CC_GNU) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS)) || __has_attribute(optimize)) \
1280 && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG)
1300 int numberPrinted = 0;
1318 abi::__cxa_demangle(
function.
toUtf8(),
nullptr,
nullptr,
nullptr));
1323 if (
function.isEmpty()) {
1329 if (numberPrinted == 0) {
1342 const char *
function)
1347 QStringList frames = backtraceFramesForLogMessage(backtraceDepth);
1348 if (frames.isEmpty())
1352 if (
function && frames.at(0).startsWith(
QLatin1Char(
'?')))
1355 return frames.join(backtraceSeparator);
1390 #ifndef QT_BOOTSTRAPPED
1391 int timeArgsIdx = 0;
1392 #ifdef QLOGGING_HAVE_BACKTRACE
1393 int backtraceArgsIdx = 0;
1400 if (
token == endifTokenC) {
1405 #ifndef QT_BOOTSTRAPPED
1406 if (
token == timeTokenC)
1408 #ifdef QLOGGING_HAVE_BACKTRACE
1409 else if (
token == backtraceTokenC)
1413 }
else if (
token == messageTokenC) {
1415 }
else if (
token == categoryTokenC) {
1416 #ifndef Q_OS_ANDROID
1420 }
else if (
token == typeTokenC) {
1428 }
else if (
token == fileTokenC) {
1433 }
else if (
token == lineTokenC) {
1435 }
else if (
token == functionTokenC) {
1440 #ifndef QT_BOOTSTRAPPED
1441 }
else if (
token == pidTokenC) {
1443 }
else if (
token == appnameTokenC) {
1445 }
else if (
token == threadidTokenC) {
1448 }
else if (
token == qthreadptrTokenC) {
1451 #ifdef QLOGGING_HAVE_BACKTRACE
1452 }
else if (
token == backtraceTokenC) {
1455 message.append(formatBacktraceForLogMessage(backtraceParams,
context.function));
1457 }
else if (
token == timeTokenC) {
1468 #if QT_CONFIG(datestring)
1469 }
else if (timeFormat.
isEmpty()) {
1476 }
else if (
token == ifCategoryTokenC) {
1477 if (isDefaultCategory(
context.category))
1479 #define HANDLE_IF_TOKEN(LEVEL) \
1480 } else if (token == if##LEVEL##TokenC) { \
1481 skip = type != Qt##LEVEL##Msg;
1487 #undef HANDLE_IF_TOKEN
1502 #if defined(QT_BOOTSTRAPPED)
1506 #if QT_CONFIG(slog2)
1508 #define QT_LOG_CODE 9000
1518 if (slog2_set_default_buffer((slog2_buffer_t)-1) == 0) {
1519 slog2_buffer_set_config_t buffer_config;
1520 slog2_buffer_t buffer_handle;
1522 buffer_config.buffer_set_name = __progname;
1523 buffer_config.num_buffers = 1;
1524 buffer_config.verbosity_level = SLOG2_DEBUG1;
1525 buffer_config.buffer_config[0].buffer_name =
"default";
1526 buffer_config.buffer_config[0].num_pages = 8;
1528 if (slog2_register(&buffer_config, &buffer_handle, 0) == -1) {
1529 fprintf(stderr,
"Error registering slogger2 buffer!\n");
1536 slog2_set_default_buffer(buffer_handle);
1564 #if QT_CONFIG(journald)
1574 int priority = LOG_INFO;
1577 priority = LOG_DEBUG;
1580 priority = LOG_INFO;
1583 priority = LOG_WARNING;
1586 priority = LOG_CRIT;
1589 priority = LOG_ALERT;
1594 "PRIORITY=%i", priority,
1598 "QT_CATEGORY=%s",
context.category ?
context.category :
"unknown",
1605 #if QT_CONFIG(syslog)
1613 int priority = LOG_INFO;
1616 priority = LOG_DEBUG;
1619 priority = LOG_INFO;
1622 priority = LOG_WARNING;
1625 priority = LOG_CRIT;
1628 priority = LOG_ALERT;
1648 android_LogPriority priority = ANDROID_LOG_DEBUG;
1651 priority = ANDROID_LOG_DEBUG;
1654 priority = ANDROID_LOG_INFO;
1657 priority = ANDROID_LOG_WARN;
1660 priority = ANDROID_LOG_ERROR;
1663 priority = ANDROID_LOG_FATAL;
1669 __android_log_print(priority, isDefaultCategory(
context.category) ?
1671 "%s\n", qPrintable(formattedMessage));
1680 const qsizetype maxOutputStringLength = 32766;
1684 if (
message.length() <= maxOutputStringLength) {
1685 OutputDebugString(
reinterpret_cast<const wchar_t *
>(
message.utf16()));
1687 wchar_t *messagePart =
new wchar_t[maxOutputStringLength + 1];
1692 messagePart[
len] = 0;
1693 OutputDebugString(messagePart);
1695 delete[] messagePart;
1705 win_outputDebugString_helper(formattedMessage);
1720 int emOutputFlags = (EM_LOG_CONSOLE | EM_LOG_DEMANGLE);
1728 emOutputFlags |= EM_LOG_WARN;
1731 emOutputFlags |= EM_LOG_ERROR;
1734 emOutputFlags |= EM_LOG_ERROR;
1736 emscripten_log(emOutputFlags,
"%s\n", qPrintable(formattedMessage));
1752 if (formattedMessage.
isNull())
1765 bool handledStderr =
false;
1773 #if !defined(QT_BOOTSTRAPPED)
1774 # if defined(Q_OS_WIN)
1776 # elif QT_CONFIG(slog2)
1778 # elif QT_CONFIG(journald)
1780 # elif QT_CONFIG(syslog)
1782 # elif defined(Q_OS_ANDROID)
1784 # elif defined(QT_USE_APPLE_UNIFIED_LOGGING)
1786 # elif defined Q_OS_WASM
1795 #if defined(Q_COMPILER_THREAD_LOCAL)
1797 static thread_local
bool msgHandlerGrabbed =
false;
1799 static bool grabMessageHandler()
1801 if (msgHandlerGrabbed)
1804 msgHandlerGrabbed =
true;
1808 static void ungrabMessageHandler()
1810 msgHandlerGrabbed =
false;
1814 static bool grabMessageHandler() {
return true; }
1815 static void ungrabMessageHandler() { }
1820 #ifndef QT_BOOTSTRAPPED
1826 if (!defaultCategory->isEnabled(msgType))
1834 if (grabMessageHandler()) {
1835 const auto ungrab =
qScopeGuard([]{ ungrabMessageHandler(); });
1837 (msgHandler ? msgHandler : qDefaultMessageHandler)(msgType,
context,
message);
1839 fprintf(stderr,
"%s\n",
message.toLocal8Bit().constData());
1845 #if defined(Q_OS_WIN) && !defined(QT_BOOTSTRAPPED)
1847 win_outputDebugString_helper(
message);
1851 fprintf(stderr,
"%s",
message.toLocal8Bit().constData());
1857 #if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)
1858 wchar_t contextFileL[256];
1862 convert_to_wchar_t_elided(contextFileL,
sizeof contextFileL /
sizeof *contextFileL,
1865 int reportMode = _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_WNDW);
1866 _CrtSetReportMode(_CRT_ERROR, reportMode);
1868 int ret = _CrtDbgReportW(_CRT_ERROR, contextFileL,
context.line, _CRT_WIDE(QT_VERSION_STR),
1869 reinterpret_cast<const wchar_t *
>(
message.utf16()));
1870 if ((
ret == 0) && (reportMode & _CRTDBG_MODE_WNDW))
1889 if (isFatal(msgType))
2048 return qDefaultMessageHandler;
2055 if (!qMessagePattern()->fromEnvironment)
2056 qMessagePattern()->setPattern(
pattern);
2070 this->
category = logContext.category;
2071 this->
file = logContext.file;
2072 this->
line = logContext.line;
2073 this->
function = logContext.function;
small capitals from c petite p scientific i
[1]
static bool messageHandler(QtMsgType msgType, const QMessageLogContext &context, const QString &message, const QString &subsystem=QString())
The QAtomicInt class provides platform-independent atomic operations on int.
T fetchAndAddRelaxed(T valueToAdd) noexcept
T loadRelaxed() const noexcept
Type fetchAndStoreOrdered(Type newValue) noexcept
Type loadAcquire() const noexcept
The QByteArray class provides an array of bytes.
const char * constData() const noexcept
The QChar class provides a 16-bit Unicode character.
static constexpr QChar fromLatin1(char c) noexcept
static qint64 applicationPid() Q_DECL_CONST_FUNCTION
QString applicationName
the name of this application
static QDateTime currentDateTime()
static QDeadlineTimer current(Qt::TimerType timerType=Qt::CoarseTimer) noexcept
qint64 deadline() const noexcept Q_DECL_PURE_FUNCTION
The QDebug class provides an output stream for debugging information.
The QElapsedTimer class provides a fast way to calculate elapsed times.
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
qsizetype size() const noexcept
const_reference at(qsizetype i) const noexcept
void append(parameter_type t)
The QLoggingCategory class represents a category, or 'area' in the logging infrastructure.
bool isInfoEnabled() const
static QLoggingCategory * defaultCategory()
bool isWarningEnabled() const
bool isCriticalEnabled() const
const char * categoryName() const
bool isDebugEnabled() const
The QMessageLogContext class provides additional information about a log message.
Q_DECL_COLD_FUNCTION QDebug critical() const
Q_DECL_COLD_FUNCTION QDebug warning() const
void void void void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void Q_NORETURN Q_DECL_COLD_FUNCTION void QDebug debug() const
void void void void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void Q_NORETURN Q_DECL_COLD_FUNCTION void fatal(const char *msg,...) const noexcept Q_ATTRIBUTE_FORMAT_PRINTF(2
QNoDebug noDebug() const noexcept
void void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void typedef const QLoggingCategory &(* CategoryFunction)()
The QMutex class provides access serialization between threads.
The QRegularExpression class provides pattern matching using regular expressions.
QRegularExpressionMatch match(const QString &subject, qsizetype offset=0, MatchType matchType=NormalMatch, MatchOptions matchOptions=NoMatchOption) const
The QRegularExpressionMatch class provides the results of a matching a QRegularExpression against a s...
QStringView capturedView(int nth=0) const
The QScopedPointer class stores a pointer to a dynamically allocated object, and deletes it upon dest...
The QString class provides a Unicode character string.
QByteArray toLatin1() const &
int toInt(bool *ok=nullptr, int base=10) const
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
static QString fromLatin1(QByteArrayView ba)
static QString fromLocal8Bit(QByteArrayView ba)
static QString fromUtf8(QByteArrayView utf8)
QString mid(qsizetype position, qsizetype n=-1) const
const QChar at(qsizetype i) const
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QByteArray toLocal8Bit() const &
static QString vasprintf(const char *format, va_list ap) Q_ATTRIBUTE_FORMAT_PRINTF(1
static QString number(int, int base=10)
QString & append(QChar c)
static QString static QString qsizetype indexOf(QChar c, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QByteArray toUtf8() const &
static QString static QString asprintf(const char *format,...) Q_ATTRIBUTE_FORMAT_PRINTF(1
The QStringList class provides a list of strings.
The QStringView class provides a unified view on UTF-16 strings with a read-only subset of the QStrin...
int toInt(bool *ok=nullptr, int base=10) const
constexpr QStringView mid(qsizetype pos, qsizetype n=-1) const noexcept
qsizetype toWCharArray(wchar_t *array) const
static Qt::HANDLE currentThreadId() noexcept Q_DECL_PURE_FUNCTION
static QThread * currentThread()
const QLoggingCategory & category()
[1]
Q_AUTOTEST_EXPORT QByteArray qCleanupFuncinfo(QByteArray info)
#define HANDLE_IF_TOKEN(LEVEL)
Q_DECLARE_TYPEINFO(QMessagePattern::BacktraceParams, Q_RELOCATABLE_TYPE)
static void const void const char bool unsigned int int const char va_start(ap, message)
auto it unsigned count const
backing_store_ptr info
[4]
void toString(QString &appendTo, IPv4Address address)
std::chrono::milliseconds ms
Lock qt_scoped_lock(Mutex &mutex)
Lock qt_unique_lock(Mutex &mutex)
int toUtf8(char16_t u, OutputPtr &dst, InputPtr &src, InputPtr end)
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION bool startsWith(QByteArrayView haystack, QByteArrayView needle) noexcept
int PRIV() strcmp(PCRE2_SPTR str1, PCRE2_SPTR str2)
PCRE2_SIZE PRIV() strlen(PCRE2_SPTR str)
#define Q_BASIC_ATOMIC_INITIALIZER(a)
size_t qstrlen(const char *str)
EGLOutputLayerEXT EGLint EGLAttrib value
#define Q_AUTOTEST_EXPORT
unsigned long long quint64
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
Q_CORE_EXPORT Q_DECL_COLD_FUNCTION void qErrnoWarning(int code, const char *msg,...)
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 length
GLenum GLuint GLenum GLsizei const GLchar * message
GLenum GLuint GLenum severity
GLint GLenum GLsizei GLsizei GLsizei depth
GLsizei const GLchar ** strings
[1]
GLenum GLuint GLenum GLsizei const GLchar * buf
GLfloat GLfloat GLfloat GLfloat h
QScopeGuard< typename std::decay< F >::type > qScopeGuard(F &&f)
[qScopeGuard]
#define QStringLiteral(str)
QString qt_error_string(int code)
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
QString backtraceSeparator
QList< QString > timeArgs
std::unique_ptr< std::unique_ptr< const char[]>[]> literals
void setPattern(const QString &pattern)
std::unique_ptr< const char *[]> tokens
QList< BacktraceParams > backtraceArgs