mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
fix(OtherLogsPage): handle empty log lines
Signed-off-by: so5iso4ka <so5iso4ka@icloud.com>
This commit is contained in:
parent
031015b332
commit
e9cdef65e6
1 changed files with 8 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue