refactor: remove StringUtils::trimEnd and just use QString::trimmed
This commit is contained in:
parent
a23e35c522
commit
da5f3c0be1
2 changed files with 1 additions and 10 deletions
|
|
@ -757,7 +757,7 @@ void MainWindow::handleLogLine(const QString &line)
|
||||||
|
|
||||||
// only trim end instead of the whole line to prevent tab-indented debug
|
// only trim end instead of the whole line to prevent tab-indented debug
|
||||||
// filenames from losing their indentation.
|
// filenames from losing their indentation.
|
||||||
ui->textLog->appendPlainText(trimEnd(line));
|
ui->textLog->appendPlainText(line.trimmed());
|
||||||
|
|
||||||
if (scrollAtBottom) {
|
if (scrollAtBottom) {
|
||||||
verticalScroll->setValue(verticalScroll->maximum());
|
verticalScroll->setValue(verticalScroll->maximum());
|
||||||
|
|
|
||||||
|
|
@ -15,12 +15,3 @@ inline bool strToTrue(const QString &str)
|
||||||
{
|
{
|
||||||
return str.toLower() == "true" || str == "1";
|
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;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue