fix(OtherLogsPage): handle empty log lines

Signed-off-by: so5iso4ka <so5iso4ka@icloud.com>
This commit is contained in:
so5iso4ka 2026-04-26 18:04:29 +03:00
parent 031015b332
commit e9cdef65e6
No known key found for this signature in database
GPG key ID: 89A708FD35C97ED9

View file

@ -277,12 +277,15 @@ void OtherLogsPage::reload()
MessageLevel last = MessageLevel::Unknown;
auto handleLine = [this, &last](QString line) {
if (line.isEmpty())
if (!line.isEmpty() && line.back() == '\n') {
line.resize(line.size() - 1);
}
if (!line.isEmpty() && line.back() == '\r') {
line.resize(line.size() - 1);
}
if (line.isEmpty()) {
return false;
if (line.back() == '\n')
line.resize(line.size() - 1);
if (line.back() == '\r')
line.resize(line.size() - 1);
}
MessageLevel level = MessageLevel::Unknown;
QString lineTemp = line; // don't edit out the time and level for clarity