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/protocols/filehandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/protocols/filehandler.cpp') diff --git a/src/protocols/filehandler.cpp b/src/protocols/filehandler.cpp index f352fa4..32beeb0 100644 --- a/src/protocols/filehandler.cpp +++ b/src/protocols/filehandler.cpp @@ -35,7 +35,7 @@ bool FileHandler::startRequest(const QUrl &url, RequestOptions options) // URL points to directory - we create Gemtext // page which lists contents of directory. QString page; - page += QString(tr("# Index of %1\n")).arg(url.path()); + page += tr("# Index of %1\n").arg(url.path()); auto filters = QDir::Dirs | QDir::Files | QDir::NoDot; if (kristall::globals().options.show_hidden_files_in_dirs) filters |= QDir::Hidden; @@ -45,7 +45,7 @@ bool FileHandler::startRequest(const QUrl &url, RequestOptions options) for (unsigned i = 0; i < dir.count(); ++i) { // Add link to page. - page += QString(tr("=> file://%1 %2\n")) + page += tr("=> file://%1 %2\n") .arg(QUrl(dir.filePath(dir[i])).toString(QUrl::FullyEncoded), dir[i]); } -- cgit v1.2.3