Translations: Replace QCoreApplication::translate() with Tr::tr()

Calling <Module>::Tr::tr() is preferred over
QCoreApplication::translate("::<Module>", "..."). This changes
occurrences in .cpp files.

Change-Id: I3311ef0dbf3e7d105a3f181b6b988f3b444468f1
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2023-02-09 11:43:49 +01:00
parent 14280acfd9
commit 226799858c
26 changed files with 59 additions and 68 deletions

View File

@@ -78,7 +78,7 @@ void FileUtils::showInGraphicalShell(QWidget *parent, const FilePath &pathIn)
UnixUtils::substituteFileBrowserParameters(app, folder));
QString error;
if (browserArgs.isEmpty()) {
error = QApplication::translate("::Core", "The command for file browser is not set.");
error = Tr::tr("The command for file browser is not set.");
} else {
QProcess browserProc;
browserProc.setProgram(browserArgs.takeFirst());
@@ -86,7 +86,7 @@ void FileUtils::showInGraphicalShell(QWidget *parent, const FilePath &pathIn)
const bool success = browserProc.startDetached();
error = QString::fromLocal8Bit(browserProc.readAllStandardError());
if (!success && error.isEmpty())
error = QApplication::translate("::Core", "Error while starting file browser.");
error = Tr::tr("Error while starting file browser.");
}
if (!error.isEmpty())
showGraphicalShellError(parent, app, error);