diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2023-02-07 22:46:35 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2023-02-08 08:32:42 +0000 |
commit | 9db70d8810dbee8c3b54e4d69f9dfcee27f90259 (patch) | |
tree | df271ab90654d433b1ecc690db4ee3ee6acccb73 /src/plugins/resourceeditor | |
parent | 2356f28647c04718919a090a4784c9453cd0c02a (diff) |
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>
Diffstat (limited to 'src/plugins/resourceeditor')
-rw-r--r-- | src/plugins/resourceeditor/resourcenode.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/resourceeditor/resourcenode.cpp b/src/plugins/resourceeditor/resourcenode.cpp index 85cea13c07..fa0e3b5e4a 100644 --- a/src/plugins/resourceeditor/resourcenode.cpp +++ b/src/plugins/resourceeditor/resourcenode.cpp @@ -2,7 +2,9 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include "resourcenode.h" + #include "resourceeditorconstants.h" +#include "resourceeditortr.h" #include "qrceditor/resourcefile_p.h" #include <coreplugin/documentmanager.h> @@ -433,9 +435,7 @@ bool ResourceTopLevelNode::removeNonExistingFiles() FolderNode::AddNewInformation ResourceTopLevelNode::addNewInformation(const FilePaths &files, Node *context) const { - QString name = QCoreApplication::translate("ResourceTopLevelNode", "%1 Prefix: %2") - .arg(filePath().fileName()) - .arg(QLatin1Char('/')); + const QString name = Tr::tr("%1 Prefix: %2").arg(filePath().fileName()).arg(QLatin1Char('/')); int p = getPriorityFromContextNode(this, context); if (p == -1 && hasPriority(files)) { // images/* and qml/js mimetypes @@ -574,8 +574,7 @@ bool ResourceFolderNode::renamePrefix(const QString &prefix, const QString &lang FolderNode::AddNewInformation ResourceFolderNode::addNewInformation(const FilePaths &files, Node *context) const { - QString name = QCoreApplication::translate("ResourceTopLevelNode", "%1 Prefix: %2") - .arg(m_topLevelNode->filePath().fileName()) + const QString name = Tr::tr("%1 Prefix: %2").arg(m_topLevelNode->filePath().fileName()) .arg(displayName()); int p = getPriorityFromContextNode(this, context); |