refactor: remove StringUtils::trimEnd and just use QString::trimmed

This commit is contained in:
sithlord48
2025-03-20 21:09:45 -04:00
committed by Nick Bolton
parent a23e35c522
commit da5f3c0be1
2 changed files with 1 additions and 10 deletions

View File

@ -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());

View File

@ -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;
}