16#include <QtCore/private/qlocking_p.h>
17#include <QtCore/private/qsimd_p.h>
19#ifndef QT_BOOTSTRAPPED
25#include "private/qloggingregistry_p.h"
26#include "private/qcoreapplication_p.h"
27#include <qtcore_tracepoints_p.h>
38#if __has_include(<paths.h>)
43#include <android/log.h>
47#include <QtCore/private/qcore_mac_p.h>
50#if QT_CONFIG(journald)
51# define SD_JOURNAL_SUPPRESS_LOCATION
52# include <systemd/sd-journal.h>
59# include <sys/types.h>
62# include "private/qcore_unix_p.h"
66#include <emscripten/emscripten.h>
70extern char *__progname;
73#ifndef QT_BOOTSTRAPPED
74#if __has_include(<cxxabi.h>) && QT_CONFIG(backtrace) && QT_CONFIG(regularexpression)
79# include BACKTRACE_HEADER
81# define QLOGGING_HAVE_BACKTRACE
84#if defined(Q_OS_LINUX) && (defined(__GLIBC__) || __has_include(<sys/syscall.h>))
85# include <sys/syscall.h>
87# if defined(Q_OS_ANDROID) && !defined(SYS_gettid)
88# define SYS_gettid __NR_gettid
91static long qt_gettid()
95 return syscall(SYS_gettid);
97#elif defined(Q_OS_DARWIN)
103 pthread_threadid_np(NULL, &tid);
106#elif defined(Q_OS_FREEBSD_KERNEL) && defined(__FreeBSD_version) && __FreeBSD_version >= 900031
107# include <pthread_np.h>
108static int qt_gettid()
110 return pthread_getthreadid_np();
132#ifndef QT_BOOTSTRAPPED
166#if !defined(Q_CC_MSVC_ONLY)
192 int v =
n.loadRelaxed();
193 while (
v != 0 && !
n.testAndSetRelaxed(
v,
v - 1,
v))
259 fprintf(stderr,
"warning: Environment variable QT_LOGGING_TO_CONSOLE is deprecated, use\n"
260 "QT_ASSUME_STDERR_HAS_CONSOLE and/or QT_FORCE_STDERR_LOGGING instead.\n");
268 return GetConsoleWindow();
269#elif defined(Q_OS_UNIX)
271# define _PATH_TTY "/dev/tty"
279 }
else if (errno == ENOENT || errno == EPERM || errno == ENXIO) {
281 return isatty(STDERR_FILENO);
350#if defined(Q_CC_MSVC_ONLY) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)
351static inline void convert_to_wchar_t_elided(
wchar_t *
d,
size_t space,
const char *
s)
noexcept
354 if (
len + 1 > space) {
355 const size_t skip =
len - space + 4;
358 for (
int i = 0;
i < 3; ++
i)
443 ctxt.copyContextFrom(context);
463 const char *msg, ...)
const
470 ctxt.copyContextFrom(context);
482#ifndef QT_NO_DEBUG_STREAM
493 ctxt.copyContextFrom(context);
507 dbg.stream->message_output =
false;
510 ctxt.copyContextFrom(context);
524 return debug((*catFunc)());
554 ctxt.copyContextFrom(context);
574 const char *msg, ...)
const
581 ctxt.copyContextFrom(context);
593#ifndef QT_NO_DEBUG_STREAM
605 ctxt.copyContextFrom(context);
619 dbg.stream->message_output =
false;
622 ctxt.copyContextFrom(context);
636 return info((*catFunc)());
672 ctxt.copyContextFrom(context);
692 const char *msg, ...)
const
699 ctxt.copyContextFrom(context);
711#ifndef QT_NO_DEBUG_STREAM
721 ctxt.copyContextFrom(context);
734 dbg.stream->message_output =
false;
737 ctxt.copyContextFrom(context);
788 ctxt.copyContextFrom(context);
808 const char *msg, ...)
const
815 ctxt.copyContextFrom(context);
827#ifndef QT_NO_DEBUG_STREAM
837 ctxt.copyContextFrom(context);
851 dbg.stream->message_output =
false;
854 ctxt.copyContextFrom(context);
885 ctxt.copyContextFrom(context);
906 const char *msg, ...) const noexcept
911 ctxt.copyContextFrom(context);
942#ifndef QT_NO_DEBUG_STREAM
954 ctxt.copyContextFrom(context);
969 ctxt.copyContextFrom(context);
983 return fatal((*catFunc)());
1004 if (
info.endsWith(
']') && !(
info.startsWith(
'+') ||
info.startsWith(
'-'))) {
1011 if (
info.endsWith(
' ')) {
1017 static const char operator_call[] =
"operator()";
1018 static const char operator_lessThan[] =
"operator<";
1019 static const char operator_greaterThan[] =
"operator>";
1020 static const char operator_lessThanEqual[] =
"operator<=";
1021 static const char operator_greaterThanEqual[] =
"operator>=";
1024 info.replace(
"operator ",
"operator");
1035 if (
info.indexOf(
'>',
pos) != -1
1036 ||
info.indexOf(
':',
pos) != -1) {
1045 while (
pos && parencount) {
1052 if (parencount != 0)
1057 if (
info.at(
pos - 1) ==
')') {
1074 int templatecount = 0;
1081 if (
info.indexOf(operator_call) ==
pos -
qsizetype(strlen(operator_call)) + 1)
1085 if (
info.indexOf(operator_lessThan) ==
pos -
qsizetype(strlen(operator_lessThan)) + 1)
1089 if (
info.indexOf(operator_greaterThan) ==
pos -
qsizetype(strlen(operator_greaterThan)) + 1)
1093 auto operatorLength =
qsizetype(strlen(operator_lessThanEqual));
1094 if (
info.indexOf(operator_lessThanEqual) ==
pos - operatorLength + 1)
1096 else if (
info.indexOf(operator_greaterThanEqual) ==
pos - operatorLength + 1)
1106 if (parencount < 0 || templatecount < 0)
1118 else if (
c ==
' ' && templatecount == 0 && parencount == 0)
1126 while ((
info.at(0) ==
'*')
1127 || (
info.at(0) ==
'&'))
1132 while ((
pos =
info.lastIndexOf(
'>')) != -1) {
1133 if (!
info.contains(
'<'))
1140 while (
pos && templatecount) {
1187 std::unique_ptr<std::unique_ptr<const char[]>[]>
literals;
1190#ifndef QT_BOOTSTRAPPED
1193#ifdef QLOGGING_HAVE_BACKTRACE
1194 struct BacktraceParams
1205#ifdef QLOGGING_HAVE_BACKTRACE
1213#ifndef QT_BOOTSTRAPPED
1231#ifdef QLOGGING_HAVE_BACKTRACE
1232 backtraceArgs.clear();
1238 bool inPlaceholder =
false;
1241 if (
c == u
'%' && !inPlaceholder) {
1249 inPlaceholder =
true;
1255 if (
c == u
'}' && inPlaceholder) {
1259 inPlaceholder =
false;
1266 std::vector<std::unique_ptr<const char[]>> literalsVar;
1267 tokens.reset(
new const char *[lexemes.
size() + 1]);
1270 bool nestedIfError =
false;
1274 for (
int i = 0;
i < lexemes.
size(); ++
i) {
1306#ifdef QLOGGING_HAVE_BACKTRACE
1309 int backtraceDepth = 5;
1316 error +=
"QT_MESSAGE_PATTERN: %{backtrace} depth must be a number greater than 0\n"_L1;
1318 backtraceDepth =
depth;
1320 m = separatorRx.
match(lexeme);
1322 backtraceSeparator =
m.captured(1);
1323 BacktraceParams backtraceParams;
1324 backtraceParams.backtraceDepth = backtraceDepth;
1325 backtraceParams.backtraceSeparator = backtraceSeparator;
1326 backtraceArgs.
append(backtraceParams);
1328 error +=
"QT_MESSAGE_PATTERN: %{backtrace} is not supported by this Qt build\n"_L1;
1333#define IF_TOKEN(LEVEL) \
1334 else if (lexeme == QLatin1StringView(LEVEL)) { \
1336 nestedIfError = true; \
1337 tokens[i] = LEVEL; \
1349 if (!inIf && !nestedIfError)
1350 error +=
"QT_MESSAGE_PATTERN: %{endif} without an %{if-*}\n"_L1;
1358 using UP = std::unique_ptr<char[]>;
1363 error +=
"QT_MESSAGE_PATTERN: %{if-*} cannot be nested\n"_L1;
1365 error +=
"QT_MESSAGE_PATTERN: missing %{endif}\n"_L1;
1367 if (!
error.isEmpty())
1370 literals.reset(
new std::unique_ptr<
const char[]>[literalsVar.size() + 1]);
1371 std::move(literalsVar.begin(), literalsVar.end(), &
literals[0]);
1374#if defined(QLOGGING_HAVE_BACKTRACE) && !defined(QT_BOOTSTRAPPED)
1387static constexpr int TypicalBacktraceFrameCount = 8;
1389# if defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
1391# pragma GCC push_options
1392# pragma GCC optimize ("omit-frame-pointer")
1395static QStringList backtraceFramesForLogMessage(
int frameCount)
1397 struct DecodedFrame {
1403 if (frameCount == 0)
1412 auto shouldSkipFrame = [&
result](
const auto &library,
const auto &
function) {
1413 if (!
result.isEmpty() || !library.contains(
"Qt6Core"_L1))
1417 if (
function.contains(
"6QDebug"_L1))
1430 if constexpr (
sizeof(
function.at(0)) == 1)
1433 return std::move(function).toUtf8();
1436 demangled.
reset(abi::__cxa_demangle(fn,
nullptr,
nullptr,
nullptr));
1444# if QT_CONFIG(dladdr)
1447 const char *cachedFname =
nullptr;
1456 if (
const char *lastSlash = strrchr(
info.dli_fname,
'/'))
1461 if (shouldSkipFrame(lib, fn))
1465 if (lib.
data() != cachedFname) {
1466 cachedFname = lib.
data();
1469 return { cachedLibrary,
function };
1490 if (shouldSkipFrame(library, function))
1500 if (!
frame.library.isEmpty()) {
1501 if (
frame.function.isEmpty())
1511 if (
result.size() == frameCount)
1517static QString formatBacktraceForLogMessage(
const QMessagePattern::BacktraceParams backtraceParams,
1518 const char *function)
1520 QString backtraceSeparator = backtraceParams.backtraceSeparator;
1521 int backtraceDepth = backtraceParams.backtraceDepth;
1523 QStringList frames = backtraceFramesForLogMessage(backtraceDepth);
1524 if (frames.isEmpty())
1528 if (function && frames.at(0).startsWith(u
'?'))
1531 return frames.join(backtraceSeparator);
1534# if defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
1535# pragma GCC pop_options
1570#ifndef QT_BOOTSTRAPPED
1571 int timeArgsIdx = 0;
1572#ifdef QLOGGING_HAVE_BACKTRACE
1573 int backtraceArgsIdx = 0;
1585#ifndef QT_BOOTSTRAPPED
1588#ifdef QLOGGING_HAVE_BACKTRACE
1620#ifndef QT_BOOTSTRAPPED
1631#ifdef QLOGGING_HAVE_BACKTRACE
1633 QMessagePattern::BacktraceParams backtraceParams =
pattern->backtraceArgs.at(backtraceArgsIdx);
1635 message.append(formatBacktraceForLogMessage(backtraceParams,
context.function));
1640 if (timeFormat ==
"process"_L1) {
1643 }
else if (timeFormat ==
"boot"_L1) {
1648#if QT_CONFIG(datestring)
1649 }
else if (timeFormat.
isEmpty()) {
1659#define HANDLE_IF_TOKEN(LEVEL) \
1660 } else if (token == if##LEVEL##TokenC) { \
1661 skip = type != Qt##LEVEL##Msg;
1667#undef HANDLE_IF_TOKEN
1682#if defined(QT_BOOTSTRAPPED)
1688#define QT_LOG_CODE 9000
1697 formattedMessage.
append(u
'\n');
1698 if (slog2_set_default_buffer((slog2_buffer_t)-1) == 0) {
1699 slog2_buffer_set_config_t buffer_config;
1700 slog2_buffer_t buffer_handle;
1702 buffer_config.buffer_set_name = __progname;
1703 buffer_config.num_buffers = 1;
1704 buffer_config.verbosity_level = SLOG2_DEBUG1;
1705 buffer_config.buffer_config[0].buffer_name =
"default";
1706 buffer_config.buffer_config[0].num_pages = 8;
1708 if (slog2_register(&buffer_config, &buffer_handle, 0) == -1) {
1709 fprintf(stderr,
"Error registering slogger2 buffer!\n");
1716 slog2_set_default_buffer(buffer_handle);
1744#if QT_CONFIG(journald)
1754 int priority = LOG_INFO;
1757 priority = LOG_DEBUG;
1760 priority = LOG_INFO;
1763 priority = LOG_WARNING;
1766 priority = LOG_CRIT;
1769 priority = LOG_ALERT;
1774 "PRIORITY=%i", priority,
1785#if QT_CONFIG(syslog)
1793 int priority = LOG_INFO;
1796 priority = LOG_DEBUG;
1799 priority = LOG_INFO;
1802 priority = LOG_WARNING;
1805 priority = LOG_CRIT;
1808 priority = LOG_ALERT;
1828 android_LogPriority priority = ANDROID_LOG_DEBUG;
1831 priority = ANDROID_LOG_DEBUG;
1834 priority = ANDROID_LOG_INFO;
1837 priority = ANDROID_LOG_WARN;
1840 priority = ANDROID_LOG_ERROR;
1843 priority = ANDROID_LOG_FATAL;
1860 const qsizetype maxOutputStringLength = 32766;
1864 if (
message.length() <= maxOutputStringLength) {
1865 OutputDebugString(
reinterpret_cast<const wchar_t *
>(
message.utf16()));
1867 wchar_t *messagePart =
new wchar_t[maxOutputStringLength + 1];
1872 messagePart[
len] = 0;
1873 OutputDebugString(messagePart);
1875 delete[] messagePart;
1885 win_outputDebugString_helper(formattedMessage);
1900 int emOutputFlags = (EM_LOG_CONSOLE | EM_LOG_DEMANGLE);
1908 emOutputFlags |= EM_LOG_WARN;
1911 emOutputFlags |= EM_LOG_ERROR;
1914 emOutputFlags |= EM_LOG_ERROR;
1916 emscripten_log(emOutputFlags,
"%s\n",
qPrintable(formattedMessage));
1932 if (formattedMessage.
isNull())
1945 bool handledStderr =
false;
1953#if !defined(QT_BOOTSTRAPPED)
1954# if defined(Q_OS_WIN)
1956# elif QT_CONFIG(slog2)
1958# elif QT_CONFIG(journald)
1960# elif QT_CONFIG(syslog)
1962# elif defined(Q_OS_ANDROID)
1964# elif defined(QT_USE_APPLE_UNIFIED_LOGGING)
1966# elif defined Q_OS_WASM
1975#if defined(Q_COMPILER_THREAD_LOCAL)
1977Q_CONSTINIT
static thread_local bool msgHandlerGrabbed =
false;
1981 if (msgHandlerGrabbed)
1984 msgHandlerGrabbed =
true;
1990 msgHandlerGrabbed =
false;
2000#ifndef QT_BOOTSTRAPPED
2006 if (!defaultCategory->isEnabled(msgType))
2019 fprintf(stderr,
"%s\n",
message.toLocal8Bit().constData());
2025#if defined(Q_OS_WIN) && !defined(QT_BOOTSTRAPPED)
2027 win_outputDebugString_helper(
message);
2031 fprintf(stderr,
"%s",
message.toLocal8Bit().constData());
2037#if defined(Q_CC_MSVC_ONLY) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)
2038 wchar_t contextFileL[256];
2042 convert_to_wchar_t_elided(contextFileL,
sizeof contextFileL /
sizeof *contextFileL,
2045 int reportMode = _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_WNDW);
2046 _CrtSetReportMode(_CRT_ERROR, reportMode);
2048 int ret = _CrtDbgReportW(_CRT_ERROR, contextFileL,
context.line, _CRT_WIDE(QT_VERSION_STR),
2049 reinterpret_cast<const wchar_t *
>(
message.utf16()));
2050 if ((
ret == 0) && (reportMode & _CRTDBG_MODE_WNDW))
2084 buf +=
" ("_L1 + error_string + u
')';
2238 if (!qMessagePattern()->fromEnvironment)
2239 qMessagePattern()->setPattern(
pattern);
2253 this->
category = logContext.category;
2254 this->
file = logContext.file;
2255 this->
line = logContext.line;
2256 this->function = logContext.function;
static bool messageHandler(QtMsgType msgType, const QMessageLogContext &context, const QString &message, const QString &subsystem=QString())
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
static constexpr QChar fromLatin1(char c) noexcept
Converts the Latin-1 character c to its equivalent QChar.
static qint64 applicationPid() Q_DECL_CONST_FUNCTION
QString applicationName
the name of this application
static QDateTime currentDateTime()
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QDeadlineTimer current(Qt::TimerType timerType=Qt::CoarseTimer) noexcept
Returns a QDeadlineTimer that is expired but is guaranteed to contain the current time.
qint64 deadline() const noexcept Q_DECL_PURE_FUNCTION
Returns the absolute time point for the deadline stored in QDeadlineTimer object, calculated in milli...
void start() noexcept
Starts this timer.
qint64 size() const
Returns the file size in bytes.
constexpr const char * data() const noexcept
constexpr qsizetype size() const noexcept
qsizetype size() const noexcept
const_reference at(qsizetype i) const noexcept
void append(parameter_type t)
bool isInfoEnabled() const
Returns true if informational messages should be shown for this category; false otherwise.
static QLoggingCategory * defaultCategory()
Returns a pointer to the global category "default" that is used, for example, by qDebug(),...
bool isWarningEnabled() const
Returns true if warning messages should be shown for this category; false otherwise.
bool isCriticalEnabled() const
Returns true if critical messages should be shown for this category; false otherwise.
const char * categoryName() const
Returns the name of the category.
bool isDebugEnabled() const
Returns true if debug messages should be shown for this category; false otherwise.
Q_DECL_COLD_FUNCTION QDebug critical() const
Logs a critical message using a QDebug stream.
Q_DECL_COLD_FUNCTION QDebug warning() const
Logs a warning message using a QDebug stream.
void void void void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void QT_MESSAGE_LOGGER_NORETURN Q_DECL_COLD_FUNCTION void QT_MESSAGE_LOGGER_NORETURN Q_DECL_COLD_FUNCTION void QDebug debug() const
Logs a debug message using a QDebug stream.
Q_DECL_COLD_FUNCTION QDebug fatal() const
Logs a fatal message using a QDebug stream.
QDebug info() const
Logs an informational message using a QDebug stream.
QNoDebug noDebug() const noexcept
void void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void QT_MESSAGE_LOGGER_NORETURN Q_DECL_COLD_FUNCTION void typedef const QLoggingCategory &(* CategoryFunction)()
This is a typedef for a pointer to a function with the following signature:
\inmodule QtCore \reentrant
QStringView capturedView(int nth=0) const
\inmodule QtCore \reentrant
QRegularExpressionMatch match(const QString &subject, qsizetype offset=0, MatchType matchType=NormalMatch, MatchOptions matchOptions=NoMatchOption) const
Attempts to match the regular expression against the given subject string, starting at the position o...
T * data() const noexcept
Returns the value of the pointer referenced by this object.
void reset(T *other=nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval< T * >())))
Deletes the existing object it is pointing to (if any), and sets its pointer to other.
int toInt(bool *ok=nullptr, int base=10) const
Returns the string view converted to an int using base base, which is 10 by default and must be betwe...
constexpr QStringView mid(qsizetype pos, qsizetype n=-1) const noexcept
Returns the substring of length length starting at position start in this object.
qsizetype toWCharArray(wchar_t *array) const
\macro QT_RESTRICTED_CAST_FROM_ASCII
QByteArray toLatin1() const &
int toInt(bool *ok=nullptr, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QString fromLocal8Bit(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void clear()
Clears the contents of the string and makes it null.
bool isNull() const
Returns true if this string is null; otherwise returns false.
qsizetype size() const
Returns the number of characters in this string.
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString mid(qsizetype position, qsizetype n=-1) const
Returns a string that contains n characters of this string, starting at the specified position index.
const QChar at(qsizetype i) const
Returns the character at the given index position in the string.
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QByteArray toLocal8Bit() const &
static QString vasprintf(const char *format, va_list ap) Q_ATTRIBUTE_FORMAT_PRINTF(1
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
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
static Qt::HANDLE currentThreadId() noexcept Q_DECL_PURE_FUNCTION
static QThread * currentThread()
const QLoggingCategory & category()
[1]
static QT_PREPEND_NAMESPACE(qint64) qt_gettid()
static const char functionTokenC[]
static const char typeTokenC[]
static Q_NEVER_INLINE QString qt_message(QtMsgType msgType, const QMessageLogContext &context, const char *msg, va_list ap)
static Q_CONSTINIT QBasicAtomicPointer< void(QtMsgType, const QMessageLogContext &, const QString &)> messageHandler
static const char timeTokenC[]
static const char endifTokenC[]
static bool grabMessageHandler()
static const char ifInfoTokenC[]
void qt_message_output(QtMsgType msgType, const QMessageLogContext &context, const QString &message)
static const char emptyTokenC[]
static bool systemHasStderr()
Returns true if writing to stderr is supported.
static const char ifCategoryTokenC[]
static bool isDefaultCategory(const char *category)
static const char appnameTokenC[]
Q_AUTOTEST_EXPORT QByteArray qCleanupFuncinfo(QByteArray info)
static const char ifCriticalTokenC[]
#define HANDLE_IF_TOKEN(LEVEL)
static Q_NORETURN void qt_message_fatal(QtMsgType, const QMessageLogContext &context, const QString &message)
\inmodule QtCore \title Qt Logging Types
static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &buf)
static bool is_fatal_count_down(QAtomicInt &n)
static const char qthreadptrTokenC[]
static const char categoryTokenC[]
static const char lineTokenC[]
static void stderr_message_handler(QtMsgType type, const QMessageLogContext &context, const QString &message)
static const char messageTokenC[]
static const char fileTokenC[]
static const char pidTokenC[]
static const char threadidTokenC[]
static const char defaultPattern[]
static void ungrabMessageHandler()
static int checked_var_value(const char *varname)
void qErrnoWarning(const char *msg,...)
static const char ifWarningTokenC[]
static const char ifDebugTokenC[]
static const char backtraceTokenC[]
static const char ifFatalTokenC[]
static bool isFatal(QtMsgType msgType)
QtMessageHandler qInstallMessageHandler(QtMessageHandler h)
static void qt_message_print(QtMsgType, const QMessageLogContext &context, const QString &message)
static bool stderrHasConsoleAttached()
Returns true if writing to stderr will end up in a console/terminal visible to the user.
void qSetMessagePattern(const QString &pattern)
Combined button and popup list for selecting options.
Lock qt_scoped_lock(Mutex &mutex)
Lock qt_unique_lock(Mutex &mutex)
bool shouldLogToStderr()
Returns true if logging stderr should be ensured.
#define Q_BASIC_ATOMIC_INITIALIZER(a)
size_t qstrlen(const char *str)
Q_CORE_EXPORT char * qstrdup(const char *)
static int qt_safe_open(const char *pathname, int flags, mode_t mode=0777)
static int qt_safe_close(int fd)
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
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction function
DBusConnection const char DBusError * error
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define QT_TERMINATE_ON_EXCEPTION(expr)
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
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)
void(* QtMessageHandler)(QtMsgType, const QMessageLogContext &, const QString &)
constexpr const T & qMin(const T &a, const T &b)
GLsizei const GLfloat * v
[13]
GLint GLenum GLsizei GLsizei GLsizei depth
GLsizei const GLchar ** strings
[1]
GLenum GLuint GLenum GLsizei length
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei const GLchar * message
GLfloat GLfloat GLfloat GLfloat h
static void decodeFrame(const QString &f, QV4::CppStackFrame **frame)
QScopeGuard< typename std::decay< F >::type > qScopeGuard(F &&f)
[qScopeGuard]
#define qPrintable(string)
#define QStringLiteral(str)
#define Q_AUTOTEST_EXPORT
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nullptr) noexcept
#define Q_TRACE_POINT(provider, tracepoint,...)
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
unsigned long long quint64
QFileInfo info(fileName)
[8]
char * toString(const MyType &t)
[31]
QList< QString > timeArgs
std::unique_ptr< std::unique_ptr< const char[]>[]> literals
void setPattern(const QString &pattern)
std::unique_ptr< const char *[]> tokens