refactor: remove StringUtils::trimEnd and just use QString::trimmed
This commit is contained in:
@ -757,7 +757,7 @@ void MainWindow::handleLogLine(const QString &line)
|
||||
|
||||
// only trim end instead of the whole line to prevent tab-indented debug
|
||||
// filenames from losing their indentation.
|
||||
ui->textLog->appendPlainText(trimEnd(line));
|
||||
ui->textLog->appendPlainText(line.trimmed());
|
||||
|
||||
if (scrollAtBottom) {
|
||||
verticalScroll->setValue(verticalScroll->maximum());
|
||||
|
||||
@ -15,12 +15,3 @@ inline bool strToTrue(const QString &str)
|
||||
{
|
||||
return str.toLower() == "true" || str == "1";
|
||||
}
|
||||
|
||||
inline QString trimEnd(const QString &str)
|
||||
{
|
||||
QString result = str;
|
||||
while (!result.isEmpty() && result.at(result.size() - 1).isSpace()) {
|
||||
result.chop(1);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user