mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Added lock to qt_color_sink
This commit is contained in:
parent
32bab0e103
commit
3a7188505f
@ -118,13 +118,13 @@ public:
|
|||||||
|
|
||||||
void set_default_color(QTextCharFormat format)
|
void set_default_color(QTextCharFormat format)
|
||||||
{
|
{
|
||||||
// std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
|
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
|
||||||
default_color_ = format;
|
default_color_ = format;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_level_color(level::level_enum color_level, QTextCharFormat format)
|
void set_level_color(level::level_enum color_level, QTextCharFormat format)
|
||||||
{
|
{
|
||||||
// std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
|
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
|
||||||
colors_.at(static_cast<size_t>(color_level)) = format;
|
colors_.at(static_cast<size_t>(color_level)) = format;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user