Translations: Fix stray QApplication::translate() calls

For references to the module-own context, use Tr::tr().
For references to other modules, use the right context name (with "::"
prefix).

Change-Id: I6dce8f1ceccb23c44d93f1826402cd3be8e98e5a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2023-02-07 22:46:35 +01:00
parent 2356f28647
commit 9db70d8810
15 changed files with 26 additions and 31 deletions

View File

@@ -1079,7 +1079,7 @@ void QmlEnginePrivate::updateScriptSource(const QString &fileName, int lineOffse
}
//update open editors
QString titlePattern = QCoreApplication::translate("QmlEngine", "JS Source for %1").arg(fileName);
QString titlePattern = Tr::tr("JS Source for %1").arg(fileName);
//Check if there are open editors with the same title
const QList<IDocument *> documents = DocumentModel::openedDocuments();
for (IDocument *doc: documents) {
@@ -2044,7 +2044,7 @@ StackFrame QmlEnginePrivate::extractStackFrame(const QVariant &bodyVal)
stackFrame.function = extractString(body.value("func"));
if (stackFrame.function.isEmpty())
stackFrame.function = QCoreApplication::translate("QmlEngine", "Anonymous Function");
stackFrame.function = Tr::tr("Anonymous Function");
stackFrame.file = FilePath::fromString(
engine->toFileInProject(extractString(body.value("script"))));
stackFrame.usable = stackFrame.file.isReadableFile();