Skip to content

Commit

Permalink
Merge pull request #2015 from MadMax411/change-qt-sink-delete-newline…
Browse files Browse the repository at this point in the history
…-chars

Trim the newline-chars instead of removing of 2 chars
  • Loading branch information
gabime authored Jul 27, 2021
2 parents 5b4c4f3 + 84e15d1 commit 7bb5354
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/spdlog/sinks/qt_sinks.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class qtextedit_sink_p : public QObject

void append(const spdlog::string_view_t &str)
{
emit append_text(QString::fromUtf8(str.data(), static_cast<int>(str.size() - 2)));
emit append_text( QString::fromUtf8(str.data(), static_cast<int>(str.size())).trimmed() );
}

signals:
Expand Down Expand Up @@ -69,7 +69,7 @@ class qplaintextedit_sink_p : public QObject

void append(const spdlog::string_view_t &str)
{
emit append_text(QString::fromUtf8(str.data(), static_cast<int>(str.size() - 2)));
emit append_text( QString::fromUtf8(str.data(), static_cast<int>(str.size())).trimmed() );
}

signals:
Expand Down

0 comments on commit 7bb5354

Please sign in to comment.