From 5ca803a3d0e3cd656a7d22b26ce1d4d168d95f02 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 14 Jan 2025 15:20:57 -0800 Subject: [PATCH] QMessageLogger: simplify the backtrace code By moving one of the #if, we can remove the other. Change-Id: I167cf466ef965758e5e8fffd94f8f8169599e3c6 Reviewed-by: Ahmad Samir Reviewed-by: Marc Mutz --- src/corelib/global/qlogging.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index b046ee34e8e..02a5b0a0ce1 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1116,12 +1116,12 @@ struct QMessagePattern #ifndef QT_BOOTSTRAPPED std::chrono::steady_clock::time_point appStartTime = std::chrono::steady_clock::now(); #endif -#ifdef QLOGGING_HAVE_BACKTRACE struct BacktraceParams { QString backtraceSeparator; int backtraceDepth; }; +#ifdef QLOGGING_HAVE_BACKTRACE QList backtraceArgs; // backtrace arguments in sequence of %{backtrace int maxBacktraceDepth = 0; #endif @@ -1141,9 +1141,7 @@ struct QMessagePattern } #endif }; -#ifdef QLOGGING_HAVE_BACKTRACE Q_DECLARE_TYPEINFO(QMessagePattern::BacktraceParams, Q_RELOCATABLE_TYPE); -#endif Q_CONSTINIT QBasicMutex QMessagePattern::mutex;