From ba030f84276b75c9b05d981f2252ad92e7ebca67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20M=C3=A4=C3=A4tt=C3=A4?= Date: Fri, 24 Mar 2023 15:01:27 +0200 Subject: [PATCH] CTF: Fix QTRACE_LOCATION warnings during compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When compiling with CTF tracing, QTRACE_LOCATION not set warnigs are printed constantly. Fix this by changing the log to info and default log message level to warning. Change-Id: Ib167ec1b41ff0134fa9b3eba09394bb0bef54379 Reviewed-by: Hatem ElKharashy Reviewed-by: Janne Koskinen Reviewed-by: Tomi Korpipää Reviewed-by: Antti Määttä (cherry picked from commit ebdf20240cbe78746d21c6af7c267982bfea3cb0) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/tracing/qctflib.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/tracing/qctflib.cpp b/src/plugins/tracing/qctflib.cpp index e0f4db489ad..c3fdeed6607 100644 --- a/src/plugins/tracing/qctflib.cpp +++ b/src/plugins/tracing/qctflib.cpp @@ -19,7 +19,7 @@ QT_BEGIN_NAMESPACE using namespace Qt::StringLiterals; -Q_LOGGING_CATEGORY(lcDebugTrace, "qt.core.ctf"); +Q_LOGGING_CATEGORY(lcDebugTrace, "qt.core.ctf", QtWarningMsg) static const size_t packetHeaderSize = 24 + 6 * 8 + 4; static const size_t packetSize = 4096; @@ -56,7 +56,7 @@ QCtfLibImpl::QCtfLibImpl() { QString location = QString::fromUtf8(qgetenv("QTRACE_LOCATION")); if (location.isEmpty()) { - qCWarning (lcDebugTrace) << "QTRACE_LOCATION not set"; + qCInfo (lcDebugTrace) << "QTRACE_LOCATION not set"; return; }