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;