diff --git a/include/spdlog/sinks/qt_sinks.h b/include/spdlog/sinks/qt_sinks.h index 5a9a83da..f6e0b684 100644 --- a/include/spdlog/sinks/qt_sinks.h +++ b/include/spdlog/sinks/qt_sinks.h @@ -39,7 +39,7 @@ public: void append(const spdlog::string_view_t &str) { - emit append_text(QString::fromUtf8(str.data(), static_cast(str.size() - 2))); + emit append_text( QString::fromUtf8(str.data(), static_cast(str.size())).trimmed() ); } signals: @@ -69,7 +69,7 @@ public: void append(const spdlog::string_view_t &str) { - emit append_text(QString::fromUtf8(str.data(), static_cast(str.size() - 2))); + emit append_text( QString::fromUtf8(str.data(), static_cast(str.size())).trimmed() ); } signals: