From 165db819c09179cc8a48ac970ba83db18dba6072 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Tue, 31 Oct 2023 13:51:41 +0100 Subject: [PATCH] Core: Fix analyzer warnings Change-Id: I37be348b954f5fd1ba3942fb976b23aa3d7ed869 Reviewed-by: Christian Stenger Reviewed-by: --- src/plugins/coreplugin/loggingviewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/loggingviewer.cpp b/src/plugins/coreplugin/loggingviewer.cpp index 57a1f42282b..5e83c76df3e 100644 --- a/src/plugins/coreplugin/loggingviewer.cpp +++ b/src/plugins/coreplugin/loggingviewer.cpp @@ -120,7 +120,7 @@ struct SavedEntry { QColor color; QString name; - QtMsgType level; + QtMsgType level{QtFatalMsg}; std::optional> levels; static Utils::expected_str fromJson(const QJsonObject &obj) @@ -990,7 +990,7 @@ void LoggingCategoryModel::saveEnabledCategoryPreset() const QJsonArray array; - for (auto item : m_categories) { + for (const auto &item : m_categories) { QJsonObject itemObj; itemObj.insert("name", item.name()); QJsonObject entryObj;