Unverified Commit 362fdc6c authored by Muhammed Galib Uludag's avatar Muhammed Galib Uludag Committed by GitHub

trim newline chars instead of remove 2 chars

parent c07b3aee
......@@ -41,7 +41,7 @@ protected:
memory_buf_t formatted;
base_sink<Mutex>::formatter_->format(msg, formatted);
string_view_t str = string_view_t(formatted.data(), formatted.size());
QMetaObject::invokeMethod(qtextedit,"append", Qt::AutoConnection, Q_ARG(QString, QString::fromUtf8(str.data(), static_cast<int>(str.size() - 2))));
QMetaObject::invokeMethod(qtextedit,"append", Qt::AutoConnection, Q_ARG(QString, QString::fromUtf8(str.data(), static_cast<int>(str.size())).trimmed()));
}
void flush_() override {}
......@@ -73,7 +73,7 @@ protected:
memory_buf_t formatted;
base_sink<Mutex>::formatter_->format(msg, formatted);
string_view_t str = string_view_t(formatted.data(), formatted.size());
QMetaObject::invokeMethod(qplaintextedit, "appendPlainText", Qt::AutoConnection, Q_ARG(QString, QString::fromUtf8(str.data(), static_cast<int>(str.size() - 2))));
QMetaObject::invokeMethod(qplaintextedit, "appendPlainText", Qt::AutoConnection, Q_ARG(QString, QString::fromUtf8(str.data(), static_cast<int>(str.size())).trimmed()));
}
void flush_() override {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment