diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 02a5b0a0ce1..e9fd1b99213 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -92,9 +92,7 @@ QT_BEGIN_NAMESPACE using namespace Qt::StringLiterals; -#ifndef QT_BOOTSTRAPPED Q_TRACE_POINT(qtcore, qt_message_print, int type, const char *category, const char *function, const char *file, int line, const QString &message); -#endif /*! \headerfile @@ -883,7 +881,6 @@ QDebug QMessageLogger::fatal(QMessageLogger::CategoryFunction catFunc) const } #endif // QT_NO_DEBUG_STREAM -#if !defined(QT_BOOTSTRAPPED) static bool isDefaultCategory(const char *category) { return !category || strcmp(category, "default") == 0; @@ -1113,9 +1110,7 @@ struct QMessagePattern std::unique_ptr[]> literals; std::unique_ptr tokens; QList timeArgs; // timeFormats in sequence of %{time -#ifndef QT_BOOTSTRAPPED std::chrono::steady_clock::time_point appStartTime = std::chrono::steady_clock::now(); -#endif struct BacktraceParams { QString backtraceSeparator; @@ -1533,7 +1528,13 @@ static QString formatBacktraceForLogMessage(const QMessagePattern::BacktracePara return frames.join(backtraceSeparator); } -#endif // QLOGGING_HAVE_BACKTRACE && !QT_BOOTSTRAPPED +#else +void QInternalMessageLogContext::populateBacktrace(int) +{ + // initFrom() returns 0 to our caller, so we should never get here + Q_UNREACHABLE(); +} +#endif // !QLOGGING_HAVE_BACKTRACE Q_GLOBAL_STATIC(QMessagePattern, qMessagePattern) @@ -1675,20 +1676,6 @@ static QString formatLogMessage(QtMsgType type, const QMessageLogContext &contex } return message; } -#else // QT_BOOTSTRAPPED -static QString formatLogMessage(QtMsgType type, const QMessageLogContext &context, const QString &str) -{ - Q_UNUSED(type); - Q_UNUSED(context); - return str; -} -#endif -#ifndef QLOGGING_HAVE_BACKTRACE -void QInternalMessageLogContext::populateBacktrace(int) -{ - Q_UNREACHABLE(); -} -#endif static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &buf); @@ -1697,10 +1684,6 @@ Q_CONSTINIT static QBasicAtomicPointerfromEnvironment) qMessagePattern()->setPattern(pattern); } -#endif static void copyInternalContext(QInternalMessageLogContext *self, const QMessageLogContext &logContext) noexcept