From 3a7188505f99bb3deeaa4decfbb8774a8e0f8a10 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Thu, 8 Jun 2023 01:12:25 +0300 Subject: [PATCH] Added lock to qt_color_sink --- include/spdlog/sinks/qt_sinks.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/spdlog/sinks/qt_sinks.h b/include/spdlog/sinks/qt_sinks.h index a1cfd12c..7e4fb513 100644 --- a/include/spdlog/sinks/qt_sinks.h +++ b/include/spdlog/sinks/qt_sinks.h @@ -118,13 +118,13 @@ public: void set_default_color(QTextCharFormat format) { - // std::lock_guard lock(base_sink::mutex_); + std::lock_guard lock(base_sink::mutex_); default_color_ = format; } void set_level_color(level::level_enum color_level, QTextCharFormat format) { - // std::lock_guard lock(base_sink::mutex_); + std::lock_guard lock(base_sink::mutex_); colors_.at(static_cast(color_level)) = format; }