From 9ecc88dda38388871d3d316e93df7b5b629b3e47 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Thu, 15 Apr 2021 18:29:33 +0200 Subject: Unwarp tr() from QStrings We don't need to wrap tr() with QString, because it returns QString anyway. Although it doesn't change the binary size (mostly because compilers were smart to remove that already), it helps to make the code a little bit cleaner. It's a somewhat continuation of c740189bcaa5bc6c073f8b3802303acf5ac36e47, but I thought back then it happened only there, so now I've removed it from all places. --- src/mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index fd28d67..dc97ebd 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -265,7 +265,7 @@ void MainWindow::updateWindowTitle() this->setWindowTitle(tr("Kristall")); return; } - this->setWindowTitle(QString(tr("%0 - %1")).arg(tab->page_title, tr("Kristall"))); + this->setWindowTitle(tr("%0 - %1").arg(tab->page_title, tr("Kristall"))); } void MainWindow::setUiDensity(UIDensity density, bool previewing) @@ -574,7 +574,7 @@ void MainWindow::setFileStatus(const DocumentStats &stats) this->file_size->setText(IoUtil::size_human(stats.file_size)); this->file_cached->setText(stats.loaded_from_cache ? tr("(cached)") : ""); this->file_mime->setText(stats.mime_type.toString(false)); - this->load_time->setText(QString(tr("%1 ms")).arg(stats.loading_time)); + this->load_time->setText(tr("%1 ms").arg(stats.loading_time)); } else { this->file_size->setText(""); this->file_cached->setText(""); -- cgit v1.2.3