diff --git a/share/qtcreator/translations/qtcreator_cs.ts b/share/qtcreator/translations/qtcreator_cs.ts
index e40973670ae..a08377236c0 100644
--- a/share/qtcreator/translations/qtcreator_cs.ts
+++ b/share/qtcreator/translations/qtcreator_cs.ts
@@ -14154,7 +14154,7 @@ Další podrobnosti hledejte v /etc/sysctl.d/10-ptrace.conf
- ResourceEditor::Internal::ResourceEditorPlugin
+ ResourceEditor
Creates a Qt Resource file (.qrc).
Vytvoří zdrojový soubor Qt (.qrc).
@@ -14215,10 +14215,6 @@ Další podrobnosti hledejte v /etc/sysctl.d/10-ptrace.conf
Open in Text Editor
Otevřít v textovém editoru
-
- Add Prefix
- Přidat předponu
-
Remove Prefix
Odstranit předponu
@@ -14245,7 +14241,7 @@ Další podrobnosti hledejte v /etc/sysctl.d/10-ptrace.conf
- ResourceEditor::Internal::ResourceEditorW
+ ResourceEditor
Open File
Otevřít soubor
@@ -54428,7 +54424,7 @@ nelze najít v cestě.
- ResourceEditor::Internal::QrcEditor
+ ResourceEditor
Add Files
Přidat soubory
@@ -54479,7 +54475,7 @@ nelze najít v cestě.
- ResourceFile
+ ResourceEditor
The file name is empty.
Název souboru je prázdný.
@@ -54498,11 +54494,7 @@ nelze najít v cestě.
- ResourceEditor::Internal::ResourceView
-
- Open File
- Otevřít soubor
-
+ ResourceEditor
All files (*)
Všechny soubory (*)
@@ -64132,14 +64124,7 @@ Tento průvodce vás provede základními kroky, které jsou nutné pro nasazen
- ResourceEditor::ResourceTopLevelNode
-
- %1 Prefix: %2
- %1 Předpona: %2
-
-
-
- ResourceEditor::Internal::ResourceFolderNode
+ ResourceEditor
%1 Prefix: %2
%1 Předpona: %2
diff --git a/share/qtcreator/translations/qtcreator_da.ts b/share/qtcreator/translations/qtcreator_da.ts
index 4269b6d43b6..99bffc2d3b9 100644
--- a/share/qtcreator/translations/qtcreator_da.ts
+++ b/share/qtcreator/translations/qtcreator_da.ts
@@ -35739,7 +35739,7 @@ Derudover testes enhedens forbindelse.
- ResourceEditor::Internal::PrefixLangDialog
+ ResourceEditor
Prefix:
Præfiks:
@@ -35750,7 +35750,7 @@ Derudover testes enhedens forbindelse.
- ResourceEditor::Internal::QrcEditor
+ ResourceEditor
Add Files
Tilføj filer
@@ -35801,7 +35801,7 @@ Derudover testes enhedens forbindelse.
- ResourceEditor::Internal::ResourceEditorPlugin
+ ResourceEditor
&Undo
&Fortryd
@@ -35862,10 +35862,6 @@ Derudover testes enhedens forbindelse.
Copy URL "%1"
Kopiér URL'en "%1"
-
- Add Prefix
- Tilføj præfiks
-
Remove Prefix
Fjern præfiks
@@ -35888,15 +35884,11 @@ Derudover testes enhedens forbindelse.
- ResourceEditor::Internal::ResourceEditorW
+ ResourceEditor
Open File
Åbn fil
-
- Open With
- Åbn med
-
Rename File...
Omdøb fil...
@@ -35907,18 +35899,14 @@ Derudover testes enhedens forbindelse.
- ResourceEditor::Internal::ResourceView
-
- Open File
- Åbn fil
-
+ ResourceEditor
All files (*)
Alle filer (*)
- ResourceFile
+ ResourceEditor
The file name is empty.
Filnavnet er tomt.
diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts
index df4bff08e64..13161292553 100644
--- a/share/qtcreator/translations/qtcreator_de.ts
+++ b/share/qtcreator/translations/qtcreator_de.ts
@@ -7503,7 +7503,7 @@ Rename %2 to %3 anyway?
- ResourceEditor::Internal::ResourceEditorPlugin
+ ResourceEditor
&Undo
&Rückgängig
@@ -7590,15 +7590,11 @@ Rename %2 to %3 anyway?
- ResourceEditor::Internal::ResourceEditorW
+ ResourceEditor
Open File
Datei öffnen
-
- Open With
- Öffnen mit
-
Rename File...
Datei umbenennen...
@@ -19971,7 +19967,7 @@ gehören nicht zu den verifizierten Remotes in %3. Anderes Verzeichnis angeben?<
- ResourceEditor::Internal::QrcEditor
+ ResourceEditor
Invalid file location
Ungültiger Pfad
@@ -20014,11 +20010,7 @@ gehören nicht zu den verifizierten Remotes in %3. Anderes Verzeichnis angeben?<
- ResourceEditor::Internal::ResourceView
-
- Open File
- Datei öffnen
-
+ ResourceEditor
All files (*)
Alle Dateien (*)
@@ -20630,7 +20622,7 @@ Sie können hier eine andere Verbindung wählen, beispielsweise eine serielle Ve
- ResourceFile
+ ResourceEditor
The file name is empty.
Der Dateiname ist leer.
@@ -31301,7 +31293,7 @@ konnte dem Projekt "%2" nicht hinzugefügt werden.
- ResourceEditor::Internal::PrefixLangDialog
+ ResourceEditor
Prefix:
Präfix:
diff --git a/share/qtcreator/translations/qtcreator_es.ts b/share/qtcreator/translations/qtcreator_es.ts
index b06d6bacb79..05ca6f1083a 100644
--- a/share/qtcreator/translations/qtcreator_es.ts
+++ b/share/qtcreator/translations/qtcreator_es.ts
@@ -9813,7 +9813,7 @@ Para hacerlo, introduzca el atajo y un espacio en el campo Localización, y lueg
- ResourceEditor::Internal::ResourceEditorPlugin
+ ResourceEditor
Create a Qt Resource file (.qrc).
Crear un archivo de recursos Qt (.qrc).
@@ -9840,7 +9840,7 @@ Para hacerlo, introduzca el atajo y un espacio en el campo Localización, y lueg
- ResourceEditor::Internal::ResourceEditorW
+ ResourceEditor
untitled
sin título
diff --git a/share/qtcreator/translations/qtcreator_fr.ts b/share/qtcreator/translations/qtcreator_fr.ts
index 756477b217a..20d26142713 100644
--- a/share/qtcreator/translations/qtcreator_fr.ts
+++ b/share/qtcreator/translations/qtcreator_fr.ts
@@ -15496,7 +15496,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
- ResourceEditor::Internal::ResourceEditorPlugin
+ ResourceEditor
Creates a Qt Resource file (.qrc).
Crée une fichier ressource Qt (.qrc).
@@ -15531,11 +15531,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
- ResourceEditor::Internal::ResourceEditorW
-
- Open File
- Ouvrir le fichier
-
+ ResourceEditor
Open With
Ouvrir avec
@@ -52965,7 +52961,7 @@ n'a pas pu être trouvé dans le dossier.
- ResourceEditor::Internal::QrcEditor
+ ResourceEditor
Add Files
Ajouter des fichiers
@@ -53016,7 +53012,7 @@ n'a pas pu être trouvé dans le dossier.
- ResourceFile
+ ResourceEditor
The file name is empty.
Le nom de fichier est vide.
@@ -53035,7 +53031,7 @@ n'a pas pu être trouvé dans le dossier.
- ResourceEditor::Internal::ResourceView
+ ResourceEditor
Open File
Ouvrir le fichier
diff --git a/share/qtcreator/translations/qtcreator_hr.ts b/share/qtcreator/translations/qtcreator_hr.ts
index 259878b0400..92ae17534fc 100644
--- a/share/qtcreator/translations/qtcreator_hr.ts
+++ b/share/qtcreator/translations/qtcreator_hr.ts
@@ -37379,15 +37379,11 @@ Saving failed.
- ResourceEditor::Internal::QrcEditor
+ ResourceEditor
Add Files
Dodaj datoteke
-
- Add Prefix
- Dodaj prefiks
-
Invalid file location
@@ -37430,7 +37426,7 @@ Saving failed.
- ResourceFile
+ ResourceEditor
The file name is empty.
@@ -37445,7 +37441,7 @@ Saving failed.
- ResourceEditor::Internal::ResourceView
+ ResourceEditor
Open File
Otvori datoteku
@@ -37456,7 +37452,7 @@ Saving failed.
- ResourceEditor::Internal::PrefixLangDialog
+ ResourceEditor
Prefix:
Prefiks:
@@ -37467,7 +37463,7 @@ Saving failed.
- ResourceEditor::Internal::ResourceEditorPlugin
+ ResourceEditor
&Undo
&Poništi
@@ -37508,10 +37504,6 @@ Saving failed.
Open in Editor
-
- Open With
-
-
Copy Path
Kopiraj stazu
@@ -37554,11 +37546,7 @@ Saving failed.
- ResourceEditor::Internal::ResourceEditorW
-
- Open File
- Otvori datoteku
-
+ ResourceEditor
Open With
diff --git a/share/qtcreator/translations/qtcreator_hu.ts b/share/qtcreator/translations/qtcreator_hu.ts
index e87af3f821f..80173da922d 100644
--- a/share/qtcreator/translations/qtcreator_hu.ts
+++ b/share/qtcreator/translations/qtcreator_hu.ts
@@ -15796,7 +15796,7 @@ Hogy ezt megtehesse, gépelje be ezt a gyorsbillentyűt és egy szóközt a Lok
- ResourceEditor::Internal::0
+ ResourceEditor
Resource file
Forrás fájl
@@ -15831,7 +15831,7 @@ Hogy ezt megtehesse, gépelje be ezt a gyorsbillentyűt és egy szóközt a Lok
- ResourceEditor::Internal::ResourceEditorPlugin
+ ResourceEditor
Creates a Qt Resource file (.qrc).
Egy Qt forrásfájl létrehozása (.qrc).
@@ -15854,7 +15854,7 @@ Hogy ezt megtehesse, gépelje be ezt a gyorsbillentyűt és egy szóközt a Lok
- ResourceEditor::Internal::ResourceEditorW
+ ResourceEditor
untitled
címtelen
diff --git a/share/qtcreator/translations/qtcreator_it.ts b/share/qtcreator/translations/qtcreator_it.ts
index 7a65e1d330e..ee5f2e0eafd 100644
--- a/share/qtcreator/translations/qtcreator_it.ts
+++ b/share/qtcreator/translations/qtcreator_it.ts
@@ -9718,7 +9718,7 @@ Per eseguire la ricerca, scrivi questo prefisso, uno spazio e poi il termine da
- ResourceEditor::Internal::ResourceEditorPlugin
+ ResourceEditor
Creates a Qt Resource file (.qrc).
Crea un file di Risorse Qt (.qrc).
@@ -9741,7 +9741,7 @@ Per eseguire la ricerca, scrivi questo prefisso, uno spazio e poi il termine da
- ResourceEditor::Internal::ResourceEditorW
+ ResourceEditor
untitled
senza titolo
diff --git a/share/qtcreator/translations/qtcreator_ja.ts b/share/qtcreator/translations/qtcreator_ja.ts
index b34585fa645..a448e0fbe71 100644
--- a/share/qtcreator/translations/qtcreator_ja.ts
+++ b/share/qtcreator/translations/qtcreator_ja.ts
@@ -31946,7 +31946,7 @@ In addition, device connectivity will be tested.
- ResourceEditor::Internal::QrcEditor
+ ResourceEditor
Add Files
ファイルを追加
@@ -31997,7 +31997,7 @@ In addition, device connectivity will be tested.
- ResourceFile
+ ResourceEditor
The file name is empty.
ファイル名が未入力です。
@@ -32012,18 +32012,14 @@ In addition, device connectivity will be tested.
- ResourceEditor::Internal::ResourceView
-
- Open File
- ファイルを開く
-
+ ResourceEditor
All files (*)
すべてのファイル (*)
- ResourceEditor::Internal::ResourceEditorPlugin
+ ResourceEditor
&Undo
元に戻す(&U)
@@ -32064,10 +32060,6 @@ In addition, device connectivity will be tested.
Open in Editor
エディタで開く
-
- Open With
- エディタを指定して開く
-
Copy path "%1"
パス "%1" をコピー
@@ -32076,10 +32068,6 @@ In addition, device connectivity will be tested.
Copy url "%1"
URL "%1" をコピー
-
- Add Prefix
- プレフィックスの追加
-
Remove Prefix
プレフィックスを削除する
@@ -32102,7 +32090,7 @@ In addition, device connectivity will be tested.
- ResourceEditor::Internal::ResourceEditorW
+ ResourceEditor
Open File
ファイルを開く
@@ -45229,7 +45217,7 @@ Android パッケージソースディレクトリのファイルはビルドデ
- ResourceEditor::Internal::PrefixLangDialog
+ ResourceEditor
Prefix:
プレフィックス:
diff --git a/share/qtcreator/translations/qtcreator_pl.ts b/share/qtcreator/translations/qtcreator_pl.ts
index 99db5c19c6f..87c1d6fd9e5 100644
--- a/share/qtcreator/translations/qtcreator_pl.ts
+++ b/share/qtcreator/translations/qtcreator_pl.ts
@@ -8922,7 +8922,7 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos
- ResourceEditor::Internal::ResourceEditorPlugin
+ ResourceEditor
&Undo
&Cofnij
@@ -8963,10 +8963,6 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos
Open in Editor
Otwórz w edytorze
-
- Open With
- Otwórz przy pomocy
-
Copy Path
Skopiuj ścieżkę
@@ -8983,10 +8979,6 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos
Copy URL "%1"
Skopiuj URL "%1"
-
- Add Prefix
- Dodaj przedrostek
-
Remove Prefix
Usuń przedrostek
@@ -9009,11 +9001,7 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos
- ResourceEditor::Internal::ResourceEditorW
-
- Open File
- Otwórz plik
-
+ ResourceEditor
Open With
Otwórz przy pomocy
@@ -22944,7 +22932,7 @@ poinstruuje Qt Creatora o URI.
- ResourceEditor::Internal::QrcEditor
+ ResourceEditor
Add Files
Dodaj pliki
@@ -22995,7 +22983,7 @@ poinstruuje Qt Creatora o URI.
- ResourceEditor::Internal::ResourceView
+ ResourceEditor
Open File
Otwórz plik
@@ -23700,7 +23688,7 @@ You can choose another communication channel here, such as a serial line or cust
- ResourceFile
+ ResourceEditor
The file name is empty.
Nazwa pliku jest pusta.
@@ -33926,7 +33914,7 @@ Pliki z katalogu źródłowego pakietu Android są kopiowane do katalogu budowan
- ResourceEditor::Internal::PrefixLangDialog
+ ResourceEditor
Prefix:
Przedrostek:
diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts
index 2a15783365d..1e181876839 100644
--- a/share/qtcreator/translations/qtcreator_ru.ts
+++ b/share/qtcreator/translations/qtcreator_ru.ts
@@ -45697,7 +45697,7 @@ If you do not have a private key yet, you can also create one here.
- ResourceEditor::Internal::PrefixLangDialog
+ ResourceEditor
Prefix:
Префикс:
@@ -45708,7 +45708,7 @@ If you do not have a private key yet, you can also create one here.
- ResourceEditor::Internal::QrcEditor
+ ResourceEditor
Invalid file location
Неверное размещение файла
@@ -45751,7 +45751,7 @@ If you do not have a private key yet, you can also create one here.
- ResourceEditor::Internal::ResourceEditorPlugin
+ ResourceEditor
&Undo
От&менить
@@ -45838,15 +45838,7 @@ If you do not have a private key yet, you can also create one here.
- ResourceEditor::Internal::ResourceEditorW
-
- Open File
- Открыть файл
-
-
- Open With
- Открыть с помощью
-
+ ResourceEditor
Rename File...
Переименовать файл...
@@ -45861,7 +45853,7 @@ If you do not have a private key yet, you can also create one here.
- ResourceEditor::Internal::ResourceView
+ ResourceEditor
Open File
Открытие файла
@@ -45872,7 +45864,7 @@ If you do not have a private key yet, you can also create one here.
- ResourceFile
+ ResourceEditor
The file name is empty.
Пустое имя файла.
diff --git a/share/qtcreator/translations/qtcreator_sl.ts b/share/qtcreator/translations/qtcreator_sl.ts
index f8e39fac8a6..5fc69500f62 100644
--- a/share/qtcreator/translations/qtcreator_sl.ts
+++ b/share/qtcreator/translations/qtcreator_sl.ts
@@ -9182,7 +9182,7 @@ Preselects a desktop Qt for building the application if available.
- ResourceEditor::Internal::ResourceEditorPlugin
+ ResourceEditor
Qt Resource file
Datoteka z viri za Qt
@@ -9205,7 +9205,7 @@ Preselects a desktop Qt for building the application if available.
- ResourceEditor::Internal::ResourceEditorW
+ ResourceEditor
untitled
neimenovana
diff --git a/share/qtcreator/translations/qtcreator_uk.ts b/share/qtcreator/translations/qtcreator_uk.ts
index 9887a6d8884..65dcad20354 100644
--- a/share/qtcreator/translations/qtcreator_uk.ts
+++ b/share/qtcreator/translations/qtcreator_uk.ts
@@ -21457,7 +21457,7 @@ Remote stderr was: '%1'
- ResourceEditor::Internal::ResourceEditorPlugin
+ ResourceEditor
Creates a Qt Resource file (.qrc) that you can add to a Qt Widget Project.
Створення файлу ресурсів Qt (.qrc), який ви можете додати до проекту Qt Widget.
@@ -21522,10 +21522,6 @@ Remote stderr was: '%1'
Copy url "%1"
Копіювати URL "%1"
-
- Add Prefix
- Додати префікс
-
Remove Prefix
Видалити префікс
@@ -21552,15 +21548,7 @@ Remote stderr was: '%1'
- ResourceEditor::Internal::ResourceEditorW
-
- Open File
- Відкрити файл
-
-
- Open With
- Відкрити за допомогою
-
+ ResourceEditor
Rename File...
Перейменувати файл...
@@ -33801,7 +33789,7 @@ cannot be found in the path.
- ResourceEditor::Internal::QrcEditor
+ ResourceEditor
Add Files
Додати файли
@@ -33852,7 +33840,7 @@ cannot be found in the path.
- ResourceFile
+ ResourceEditor
The file name is empty.
Порожнє ім'я файлу.
@@ -33871,7 +33859,7 @@ cannot be found in the path.
- ResourceEditor::Internal::ResourceView
+ ResourceEditor
Open File
Відкрити файл
@@ -42929,14 +42917,7 @@ This wizard will guide you through the essential steps to deploy a ready-to-go d
- ResourceEditor::ResourceTopLevelNode
-
- %1 Prefix: %2
- %1 Префікс: %2
-
-
-
- ResourceEditor::Internal::ResourceFolderNode
+ ResourceEditor
%1 Prefix: %2
%1 Префікс: %2
@@ -48109,7 +48090,7 @@ The files in the Android package source directory are copied to the build direct
- ResourceEditor::Internal::PrefixLangDialog
+ ResourceEditor
Prefix:
Префікс:
diff --git a/share/qtcreator/translations/qtcreator_zh_CN.ts b/share/qtcreator/translations/qtcreator_zh_CN.ts
index 7c81cd968a1..a19b741b931 100644
--- a/share/qtcreator/translations/qtcreator_zh_CN.ts
+++ b/share/qtcreator/translations/qtcreator_zh_CN.ts
@@ -14336,7 +14336,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
- ResourceEditor::Internal::ResourceEditorPlugin
+ ResourceEditor
Creates a Qt Resource file (.qrc).
创建一个Qt 资源文件(.qrc).
@@ -14371,15 +14371,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
- ResourceEditor::Internal::ResourceEditorW
-
- Open File
- 打开文件
-
-
- Open With
- 用...打开
-
+ ResourceEditor
Rename File...
重命名文件...
@@ -49372,7 +49364,7 @@ cannot be found in the path.
- ResourceEditor::Internal::QrcEditor
+ ResourceEditor
Add Files
添加文件
@@ -49423,7 +49415,7 @@ cannot be found in the path.
- ResourceFile
+ ResourceEditor
The file name is empty.
文件名为空。
@@ -49442,7 +49434,7 @@ cannot be found in the path.
- ResourceEditor::Internal::ResourceView
+ ResourceEditor
Open File
打开文件
diff --git a/share/qtcreator/translations/qtcreator_zh_TW.ts b/share/qtcreator/translations/qtcreator_zh_TW.ts
index 936cb963927..8884be2f76c 100644
--- a/share/qtcreator/translations/qtcreator_zh_TW.ts
+++ b/share/qtcreator/translations/qtcreator_zh_TW.ts
@@ -8865,7 +8865,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
- ResourceEditor::Internal::ResourceEditorPlugin
+ ResourceEditor
Qt Resource file
Qt 資源檔
@@ -8888,7 +8888,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
- ResourceEditor::Internal::ResourceEditorW
+ ResourceEditor
Open File
開啟檔案
@@ -33725,7 +33725,7 @@ Do you want to retry?
- ResourceEditor::Internal::QrcEditor
+ ResourceEditor
Add Files
新增檔案
@@ -33776,7 +33776,7 @@ Do you want to retry?
- ResourceFile
+ ResourceEditor
The file name is empty.
檔名為空。
@@ -33795,11 +33795,7 @@ Do you want to retry?
- ResourceEditor::Internal::ResourceView
-
- Open File
- 開啟檔案
-
+ ResourceEditor
All files (*)
所有檔案 (*)
diff --git a/src/plugins/resourceeditor/qrceditor/qrceditor.cpp b/src/plugins/resourceeditor/qrceditor/qrceditor.cpp
index ba48327955d..e0ef3766418 100644
--- a/src/plugins/resourceeditor/qrceditor/qrceditor.cpp
+++ b/src/plugins/resourceeditor/qrceditor/qrceditor.cpp
@@ -24,6 +24,8 @@
****************************************************************************/
#include "qrceditor.h"
+
+#include "resourceeditortr.h"
#include "undocommands_p.h"
#include
@@ -39,8 +41,7 @@
#include
#include
-using namespace ResourceEditor;
-using namespace ResourceEditor::Internal;
+namespace ResourceEditor::Internal {
QrcEditor::QrcEditor(RelativeResourceModel *model, QWidget *parent)
: Core::MiniSplitter(Qt::Vertical, parent),
@@ -52,16 +53,16 @@ QrcEditor::QrcEditor(RelativeResourceModel *model, QWidget *parent)
m_treeview->setFrameStyle(QFrame::NoFrame);
m_treeview->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
- auto addPrefixButton = new QPushButton(tr("Add Prefix"));
- m_addFilesButton = new QPushButton(tr("Add Files"));
- m_removeButton = new QPushButton(tr("Remove"));
- m_removeNonExistingButton = new QPushButton(tr("Remove Missing Files"));
+ auto addPrefixButton = new QPushButton(Tr::tr("Add Prefix"));
+ m_addFilesButton = new QPushButton(Tr::tr("Add Files"));
+ m_removeButton = new QPushButton(Tr::tr("Remove"));
+ m_removeNonExistingButton = new QPushButton(Tr::tr("Remove Missing Files"));
- m_aliasLabel = new QLabel(tr("Alias:"));
+ m_aliasLabel = new QLabel(Tr::tr("Alias:"));
m_aliasText = new QLineEdit;
- m_prefixLabel = new QLabel(tr("Prefix:"));
+ m_prefixLabel = new QLabel(Tr::tr("Prefix:"));
m_prefixText = new QLineEdit;
- m_languageLabel = new QLabel(tr("Language:"));
+ m_languageLabel = new QLabel(Tr::tr("Language:"));
m_languageText = new QLineEdit;
using namespace Utils::Layouting;
@@ -74,7 +75,7 @@ QrcEditor::QrcEditor(RelativeResourceModel *model, QWidget *parent)
st,
},
Group {
- title(tr("Properties")),
+ title(Tr::tr("Properties")),
Form {
m_aliasLabel, m_aliasText, br,
m_prefixLabel, m_prefixText, br,
@@ -206,17 +207,18 @@ QAbstractButton *ResolveLocationContext::execLocationMessageBox(QWidget *parent,
{
if (messageBox.isNull()) {
messageBox.reset(new QMessageBox(QMessageBox::Warning,
- QrcEditor::tr("Invalid file location"),
+ Tr::tr("Invalid file location"),
QString(), QMessageBox::NoButton, parent));
- copyButton = messageBox->addButton(QrcEditor::tr("Copy"), QMessageBox::ActionRole);
- abortButton = messageBox->addButton(QrcEditor::tr("Abort"), QMessageBox::RejectRole);
+ copyButton = messageBox->addButton(Tr::tr("Copy"), QMessageBox::ActionRole);
+ abortButton = messageBox->addButton(Tr::tr("Abort"), QMessageBox::RejectRole);
messageBox->setDefaultButton(copyButton);
}
if (wantSkipButton && !skipButton) {
- skipButton = messageBox->addButton(QrcEditor::tr("Skip"), QMessageBox::DestructiveRole);
+ skipButton = messageBox->addButton(Tr::tr("Skip"), QMessageBox::DestructiveRole);
messageBox->setEscapeButton(skipButton);
}
- messageBox->setText(QrcEditor::tr("The file %1 is not in a subdirectory of the resource file. You now have the option to copy this file to a valid location.")
+ messageBox->setText(Tr::tr("The file %1 is not in a subdirectory of the resource file. "
+ "You now have the option to copy this file to a valid location.")
.arg(QDir::toNativeSeparators(file)));
messageBox->exec();
return messageBox->clickedButton();
@@ -226,7 +228,7 @@ QString ResolveLocationContext::execCopyFileDialog(QWidget *parent, const QDir &
{
// Delayed creation of file dialog.
if (copyFileDialog.isNull()) {
- copyFileDialog.reset(new QFileDialog(parent, QrcEditor::tr("Choose Copy Location")));
+ copyFileDialog.reset(new QFileDialog(parent, Tr::tr("Choose Copy Location")));
copyFileDialog->setFileMode(QFileDialog::AnyFile);
copyFileDialog->setAcceptMode(QFileDialog::AcceptSave);
}
@@ -251,15 +253,15 @@ static inline bool copyFile(const QString &file, const QString ©Name, QWidge
{
if (QFile::exists(copyName)) {
if (!QFile::remove(copyName)) {
- QMessageBox::critical(parent, QrcEditor::tr("Overwriting Failed"),
- QrcEditor::tr("Could not overwrite file %1.")
+ QMessageBox::critical(parent, Tr::tr("Overwriting Failed"),
+ Tr::tr("Could not overwrite file %1.")
.arg(QDir::toNativeSeparators(copyName)));
return false;
}
}
if (!QFile::copy(file, copyName)) {
- QMessageBox::critical(parent, QrcEditor::tr("Copying Failed"),
- QrcEditor::tr("Could not copy the file to %1.")
+ QMessageBox::critical(parent, Tr::tr("Copying Failed"),
+ Tr::tr("Could not copy the file to %1.")
.arg(QDir::toNativeSeparators(copyName)));
return false;
}
@@ -446,3 +448,5 @@ void QrcEditor::onRedo()
updateCurrent();
updateHistoryControls();
}
+
+} // ResourceEditor::Internal
diff --git a/src/plugins/resourceeditor/qrceditor/qrceditor.h b/src/plugins/resourceeditor/qrceditor/qrceditor.h
index 86cf1146921..249c32caaf7 100644
--- a/src/plugins/resourceeditor/qrceditor/qrceditor.h
+++ b/src/plugins/resourceeditor/qrceditor/qrceditor.h
@@ -36,8 +36,7 @@ class QLineEdit;
class QPushButton;
QT_END_NAMESPACE
-namespace ResourceEditor {
-namespace Internal {
+namespace ResourceEditor::Internal {
class QrcEditor : public Core::MiniSplitter
{
@@ -99,5 +98,4 @@ private:
QLineEdit *m_languageText;
};
-} // namespace Internal
-} // namespace ResourceEditor
+} // ResourceEditor::Internal
diff --git a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp
index 42071539d4a..3076e6746e8 100644
--- a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp
+++ b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp
@@ -25,9 +25,12 @@
#include "resourcefile_p.h"
+#include "../resourceeditortr.h"
+
#include
#include
#include
+
#include
#include
@@ -39,21 +42,18 @@
#include
#include
#include
+#include
#include
-#include
-#include
-#include
-#include
-
#include
#include
-
-#include
+#include
+#include
+#include
+#include
using namespace Utils;
-namespace ResourceEditor {
-namespace Internal {
+namespace ResourceEditor::Internal {
File::File(Prefix *prefix, const QString &_name, const QString &_alias)
: Node(this, prefix)
@@ -116,7 +116,7 @@ Core::IDocument::OpenResult ResourceFile::load()
m_error_message.clear();
if (m_filePath.isEmpty()) {
- m_error_message = tr("The file name is empty.");
+ m_error_message = Tr::tr("The file name is empty.");
return Core::IDocument::OpenResult::ReadError;
}
@@ -142,7 +142,7 @@ Core::IDocument::OpenResult ResourceFile::load()
QString error_msg;
int error_line, error_col;
if (!doc.setContent(data, &error_msg, &error_line, &error_col)) {
- m_error_message = tr("XML error on line %1, col %2: %3")
+ m_error_message = Tr::tr("XML error on line %1, col %2: %3")
.arg(error_line).arg(error_col).arg(error_msg);
return Core::IDocument::OpenResult::CannotHandle;
}
@@ -153,7 +153,7 @@ Core::IDocument::OpenResult ResourceFile::load()
QString error_msg;
int error_line, error_col;
if (!doc.setContent(m_contents, &error_msg, &error_line, &error_col)) {
- m_error_message = tr("XML error on line %1, col %2: %3")
+ m_error_message = Tr::tr("XML error on line %1, col %2: %3")
.arg(error_line).arg(error_col).arg(error_msg);
return Core::IDocument::OpenResult::CannotHandle;
}
@@ -162,7 +162,7 @@ Core::IDocument::OpenResult ResourceFile::load()
QDomElement root = doc.firstChildElement(QLatin1String("RCC"));
if (root.isNull()) {
- m_error_message = tr("The root element is missing.");
+ m_error_message = Tr::tr("The root element is missing.");
return Core::IDocument::OpenResult::CannotHandle;
}
@@ -241,7 +241,7 @@ bool ResourceFile::save()
m_error_message.clear();
if (m_filePath.isEmpty()) {
- m_error_message = tr("The file name is empty.");
+ m_error_message = Tr::tr("The file name is empty.");
return false;
}
@@ -461,7 +461,7 @@ void ResourceFile::orderList()
}
if (!save())
- m_error_message = tr("Cannot save file.");
+ m_error_message = Tr::tr("Cannot save file.");
}
bool ResourceFile::contains(const QString &prefix, const QString &lang, const QString &file) const
@@ -1268,5 +1268,4 @@ EntryBackup * RelativeResourceModel::removeEntry(const QModelIndex &index)
}
}
-} // Internal
-} // ResourceEditor
+} // ResourceEditor::Internal
diff --git a/src/plugins/resourceeditor/qrceditor/resourcefile_p.h b/src/plugins/resourceeditor/qrceditor/resourcefile_p.h
index 7c8f3fcf7e6..aa799591484 100644
--- a/src/plugins/resourceeditor/qrceditor/resourcefile_p.h
+++ b/src/plugins/resourceeditor/qrceditor/resourcefile_p.h
@@ -25,18 +25,18 @@
#pragma once
+#include
+
+#include
+
#include
#include
+#include
#include
#include
#include
-#include
-#include
-#include
-
-namespace ResourceEditor {
-namespace Internal {
+namespace ResourceEditor::Internal {
class File;
struct Prefix;
@@ -126,8 +126,6 @@ using PrefixList = QList;
*/
class ResourceFile
{
- Q_DECLARE_TR_FUNCTIONS(ResourceFile)
-
public:
ResourceFile(const Utils::FilePath &filePath = {}, const QString &contents = {});
~ResourceFile();
@@ -332,5 +330,4 @@ private:
bool m_resourceDragEnabled;
};
-} // namespace Internal
-} // namespace ResourceEditor
+} // ResourceEditor::Internal
diff --git a/src/plugins/resourceeditor/qrceditor/resourceview.cpp b/src/plugins/resourceeditor/qrceditor/resourceview.cpp
index 33fcab1ecb4..2f827eb6c94 100644
--- a/src/plugins/resourceeditor/qrceditor/resourceview.cpp
+++ b/src/plugins/resourceeditor/qrceditor/resourceview.cpp
@@ -25,15 +25,15 @@
#include "resourceview.h"
+#include "../resourceeditortr.h"
#include "undocommands_p.h"
#include
#include
-#include
-
#include
#include
+#include
#include
#include
#include
@@ -41,8 +41,7 @@
#include
#include
-namespace ResourceEditor {
-namespace Internal {
+namespace ResourceEditor::Internal {
ResourceView::ResourceView(RelativeResourceModel *model, QUndoStack *history, QWidget *parent) :
Utils::TreeView(parent),
@@ -205,9 +204,9 @@ void ResourceView::refresh()
QStringList ResourceView::fileNamesToAdd()
{
- return QFileDialog::getOpenFileNames(this, tr("Open File"),
+ return QFileDialog::getOpenFileNames(this, Tr::tr("Open File"),
m_qrcModel->absolutePath(QString()),
- tr("All files (*)"));
+ Tr::tr("All files (*)"));
}
QString ResourceView::currentAlias() const
@@ -359,5 +358,4 @@ bool ResourceView::resourceDragEnabled() const
return m_qrcModel->resourceDragEnabled();
}
-} // Internal
-} // ResourceEditor
+} // ResourceEditor::Internal
diff --git a/src/plugins/resourceeditor/qrceditor/resourceview.h b/src/plugins/resourceeditor/qrceditor/resourceview.h
index a783ec84d89..4a002256241 100644
--- a/src/plugins/resourceeditor/qrceditor/resourceview.h
+++ b/src/plugins/resourceeditor/qrceditor/resourceview.h
@@ -35,8 +35,7 @@ QT_BEGIN_NAMESPACE
class QUndoStack;
QT_END_NAMESPACE
-namespace ResourceEditor {
-namespace Internal {
+namespace ResourceEditor::Internal {
class RelativeResourceModel;
@@ -106,5 +105,4 @@ private:
int m_mergeId;
};
-} // namespace Internal
-} // namespace ResourceEditor
+} // ResourceEditor::Internal
diff --git a/src/plugins/resourceeditor/qrceditor/undocommands.cpp b/src/plugins/resourceeditor/qrceditor/undocommands.cpp
index 247ae519825..0c5ccf6eb05 100644
--- a/src/plugins/resourceeditor/qrceditor/undocommands.cpp
+++ b/src/plugins/resourceeditor/qrceditor/undocommands.cpp
@@ -27,8 +27,7 @@
#include
-using namespace ResourceEditor;
-using namespace ResourceEditor::Internal;
+namespace ResourceEditor::Internal {
ViewCommand::ViewCommand(ResourceView *view)
: m_view(view)
@@ -207,3 +206,5 @@ void AddEmptyPrefixCommand::undo()
m_prefixArrayIndex, 0, QModelIndex());
delete m_view->removeEntry(prefixModelIndex);
}
+
+} // ResourceEditor::Internal
diff --git a/src/plugins/resourceeditor/qrceditor/undocommands_p.h b/src/plugins/resourceeditor/qrceditor/undocommands_p.h
index aa871e32cbc..4d0e777e48a 100644
--- a/src/plugins/resourceeditor/qrceditor/undocommands_p.h
+++ b/src/plugins/resourceeditor/qrceditor/undocommands_p.h
@@ -34,8 +34,7 @@ QT_BEGIN_NAMESPACE
class QModelIndex;
QT_END_NAMESPACE
-namespace ResourceEditor {
-namespace Internal {
+namespace ResourceEditor::Internal {
/*!
\class ViewCommand
@@ -170,5 +169,4 @@ private:
void undo() override;
};
-} // namespace Internal
-} // namespace ResourceEditor
+} // ResourceEditor::Internal
diff --git a/src/plugins/resourceeditor/resourceeditorfactory.cpp b/src/plugins/resourceeditor/resourceeditorfactory.cpp
index 10a6f582717..1116db14456 100644
--- a/src/plugins/resourceeditor/resourceeditorfactory.cpp
+++ b/src/plugins/resourceeditor/resourceeditorfactory.cpp
@@ -24,21 +24,21 @@
****************************************************************************/
#include "resourceeditorfactory.h"
-#include "resourceeditorw.h"
-#include "resourceeditorplugin.h"
+
#include "resourceeditorconstants.h"
+#include "resourceeditorplugin.h"
+#include "resourceeditorw.h"
#include
#include
#include
#include
-#include
-#include
-using namespace ResourceEditor::Internal;
using namespace ResourceEditor::Constants;
+namespace ResourceEditor::Internal {
+
ResourceEditorFactory::ResourceEditorFactory(ResourceEditorPlugin *plugin)
{
setId(RESOURCEEDITOR_ID);
@@ -52,3 +52,5 @@ ResourceEditorFactory::ResourceEditorFactory(ResourceEditorPlugin *plugin)
return new ResourceEditorW(Core::Context(C_RESOURCEEDITOR), plugin);
});
}
+
+} // ResourceEditor::Internal
diff --git a/src/plugins/resourceeditor/resourceeditorfactory.h b/src/plugins/resourceeditor/resourceeditorfactory.h
index 1a54515a47e..537595e7735 100644
--- a/src/plugins/resourceeditor/resourceeditorfactory.h
+++ b/src/plugins/resourceeditor/resourceeditorfactory.h
@@ -27,8 +27,7 @@
#include
-namespace ResourceEditor {
-namespace Internal {
+namespace ResourceEditor::Internal {
class ResourceEditorPlugin;
@@ -38,5 +37,4 @@ public:
explicit ResourceEditorFactory(ResourceEditorPlugin *plugin);
};
-} // namespace Internal
-} // namespace ResourceEditor
+} // ResourceEditor::Internal
diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp
index 182b11205a7..3c1ef9f00c7 100644
--- a/src/plugins/resourceeditor/resourceeditorplugin.cpp
+++ b/src/plugins/resourceeditor/resourceeditorplugin.cpp
@@ -25,9 +25,10 @@
#include "resourceeditorplugin.h"
-#include "resourceeditorw.h"
#include "resourceeditorconstants.h"
#include "resourceeditorfactory.h"
+#include "resourceeditortr.h"
+#include "resourceeditorw.h"
#include "resourcenode.h"
#include
@@ -63,15 +64,13 @@
using namespace ProjectExplorer;
using namespace Utils;
-namespace ResourceEditor {
-namespace Internal {
+namespace ResourceEditor::Internal {
-static const char resourcePrefix[] = ":";
-static const char urlPrefix[] = "qrc:";
+const char resourcePrefix[] = ":";
+const char urlPrefix[] = "qrc:";
class PrefixLangDialog : public QDialog
{
- Q_OBJECT
public:
PrefixLangDialog(const QString &title, const QString &prefix, const QString &lang, QWidget *parent)
: QDialog(parent)
@@ -80,11 +79,11 @@ public:
auto layout = new QFormLayout(this);
m_prefixLineEdit = new QLineEdit(this);
m_prefixLineEdit->setText(prefix);
- layout->addRow(tr("Prefix:"), m_prefixLineEdit);
+ layout->addRow(Tr::tr("Prefix:"), m_prefixLineEdit);
m_langLineEdit = new QLineEdit(this);
m_langLineEdit->setText(lang);
- layout->addRow(tr("Language:"), m_langLineEdit);
+ layout->addRow(Tr::tr("Language:"), m_langLineEdit);
QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Ok
| QDialogButtonBox::Cancel,
@@ -114,8 +113,6 @@ private:
class ResourceEditorPluginPrivate : public QObject
{
- Q_DECLARE_TR_FUNCTIONS(ResourceEditor::Internal::ResourceEditorPlugin)
-
public:
explicit ResourceEditorPluginPrivate(ResourceEditorPlugin *q);
@@ -167,9 +164,9 @@ ResourceEditorPluginPrivate::ResourceEditorPluginPrivate(ResourceEditorPlugin *q
{
// Register undo and redo
const Core::Context context(Constants::C_RESOURCEEDITOR);
- m_undoAction = new QAction(tr("&Undo"), this);
- m_redoAction = new QAction(tr("&Redo"), this);
- m_refreshAction = new QAction(tr("Recheck Existence of Referenced Files"), this);
+ m_undoAction = new QAction(Tr::tr("&Undo"), this);
+ m_redoAction = new QAction(Tr::tr("&Redo"), this);
+ m_refreshAction = new QAction(Tr::tr("Recheck Existence of Referenced Files"), this);
Core::ActionManager::registerAction(m_undoAction, Core::Constants::UNDO, context);
Core::ActionManager::registerAction(m_redoAction, Core::Constants::REDO, context);
Core::ActionManager::registerAction(m_refreshAction, Constants::REFRESH, context);
@@ -184,53 +181,53 @@ ResourceEditorPluginPrivate::ResourceEditorPluginPrivate(ResourceEditorPlugin *q
Core::ActionManager::actionContainer(ProjectExplorer::Constants::M_FILECONTEXT);
Core::Command *command = nullptr;
- m_addPrefix = new QAction(tr("Add Prefix..."), this);
+ m_addPrefix = new QAction(Tr::tr("Add Prefix..."), this);
command = Core::ActionManager::registerAction(m_addPrefix, Constants::C_ADD_PREFIX, projectTreeContext);
folderContextMenu->addAction(command, ProjectExplorer::Constants::G_FOLDER_FILES);
connect(m_addPrefix, &QAction::triggered, this, &ResourceEditorPluginPrivate::addPrefixContextMenu);
- m_renamePrefix = new QAction(tr("Change Prefix..."), this);
+ m_renamePrefix = new QAction(Tr::tr("Change Prefix..."), this);
command = Core::ActionManager::registerAction(m_renamePrefix, Constants::C_RENAME_PREFIX, projectTreeContext);
folderContextMenu->addAction(command, ProjectExplorer::Constants::G_FOLDER_FILES);
connect(m_renamePrefix, &QAction::triggered, this, &ResourceEditorPluginPrivate::renamePrefixContextMenu);
- m_removePrefix = new QAction(tr("Remove Prefix..."), this);
+ m_removePrefix = new QAction(Tr::tr("Remove Prefix..."), this);
command = Core::ActionManager::registerAction(m_removePrefix, Constants::C_REMOVE_PREFIX, projectTreeContext);
folderContextMenu->addAction(command, ProjectExplorer::Constants::G_FOLDER_FILES);
connect(m_removePrefix, &QAction::triggered, this, &ResourceEditorPluginPrivate::removePrefixContextMenu);
- m_removeNonExisting = new QAction(tr("Remove Missing Files"), this);
+ m_removeNonExisting = new QAction(Tr::tr("Remove Missing Files"), this);
command = Core::ActionManager::registerAction(m_removeNonExisting, Constants::C_REMOVE_NON_EXISTING, projectTreeContext);
folderContextMenu->addAction(command, ProjectExplorer::Constants::G_FOLDER_FILES);
connect(m_removeNonExisting, &QAction::triggered, this, &ResourceEditorPluginPrivate::removeNonExisting);
- m_renameResourceFile = new QAction(tr("Rename..."), this);
+ m_renameResourceFile = new QAction(Tr::tr("Rename..."), this);
command = Core::ActionManager::registerAction(m_renameResourceFile, Constants::C_RENAME_FILE, projectTreeContext);
folderContextMenu->addAction(command, ProjectExplorer::Constants::G_FOLDER_FILES);
connect(m_renameResourceFile, &QAction::triggered, this, &ResourceEditorPluginPrivate::renameFileContextMenu);
- m_removeResourceFile = new QAction(tr("Remove File..."), this);
+ m_removeResourceFile = new QAction(Tr::tr("Remove File..."), this);
command = Core::ActionManager::registerAction(m_removeResourceFile, Constants::C_REMOVE_FILE, projectTreeContext);
folderContextMenu->addAction(command, ProjectExplorer::Constants::G_FOLDER_FILES);
connect(m_removeResourceFile, &QAction::triggered, this, &ResourceEditorPluginPrivate::removeFileContextMenu);
- m_openInEditor = new QAction(tr("Open in Editor"), this);
+ m_openInEditor = new QAction(Tr::tr("Open in Editor"), this);
command = Core::ActionManager::registerAction(m_openInEditor, Constants::C_OPEN_EDITOR, projectTreeContext);
folderContextMenu->addAction(command, ProjectExplorer::Constants::G_FOLDER_FILES);
connect(m_openInEditor, &QAction::triggered, this, &ResourceEditorPluginPrivate::openEditorContextMenu);
- m_openWithMenu = new QMenu(tr("Open With"), folderContextMenu->menu());
+ m_openWithMenu = new QMenu(Tr::tr("Open With"), folderContextMenu->menu());
folderContextMenu->menu()->insertMenu(
folderContextMenu->insertLocation(ProjectExplorer::Constants::G_FOLDER_FILES),
m_openWithMenu);
- m_copyPath = new Utils::ParameterAction(tr("Copy Path"), tr("Copy Path \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
+ m_copyPath = new Utils::ParameterAction(Tr::tr("Copy Path"), Tr::tr("Copy Path \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = Core::ActionManager::registerAction(m_copyPath, Constants::C_COPY_PATH, projectTreeContext);
command->setAttribute(Core::Command::CA_UpdateText);
fileContextMenu->addAction(command, ProjectExplorer::Constants::G_FILE_OTHER);
connect(m_copyPath, &QAction::triggered, this, &ResourceEditorPluginPrivate::copyPathContextMenu);
- m_copyUrl = new Utils::ParameterAction(tr("Copy URL"), tr("Copy URL \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
+ m_copyUrl = new Utils::ParameterAction(Tr::tr("Copy URL"), Tr::tr("Copy URL \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = Core::ActionManager::registerAction(m_copyUrl, Constants::C_COPY_URL, projectTreeContext);
command->setAttribute(Core::Command::CA_UpdateText);
fileContextMenu->addAction(command, ProjectExplorer::Constants::G_FILE_OTHER);
@@ -301,7 +298,7 @@ void ResourceEditorPluginPrivate::addPrefixContextMenu()
{
auto topLevel = dynamic_cast(ProjectTree::currentNode());
QTC_ASSERT(topLevel, return);
- PrefixLangDialog dialog(tr("Add Prefix"), QString(), QString(), Core::ICore::dialogParent());
+ PrefixLangDialog dialog(Tr::tr("Add Prefix"), QString(), QString(), Core::ICore::dialogParent());
if (dialog.exec() != QDialog::Accepted)
return;
QString prefix = dialog.prefix();
@@ -315,8 +312,8 @@ void ResourceEditorPluginPrivate::removePrefixContextMenu()
auto rfn = dynamic_cast(ProjectTree::currentNode());
QTC_ASSERT(rfn, return);
if (QMessageBox::question(Core::ICore::dialogParent(),
- tr("Remove Prefix"),
- tr("Remove prefix %1 and all its files?").arg(rfn->displayName()))
+ Tr::tr("Remove Prefix"),
+ Tr::tr("Remove prefix %1 and all its files?").arg(rfn->displayName()))
== QMessageBox::Yes) {
ResourceTopLevelNode *rn = rfn->resourceNode();
rn->removePrefix(rfn->prefix(), rfn->lang());
@@ -344,8 +341,8 @@ void ResourceEditorPluginPrivate::removeFileContextMenu()
QTC_ASSERT(parent, return);
if (parent->removeFiles({path}) != RemovedFilesFromProject::Ok)
QMessageBox::warning(Core::ICore::dialogParent(),
- tr("File Removal Failed"),
- tr("Removing file %1 from the project failed.").arg(path.toUserOutput()));
+ Tr::tr("File Removal Failed"),
+ Tr::tr("Removing file %1 from the project failed.").arg(path.toUserOutput()));
}
void ResourceEditorPluginPrivate::openEditorContextMenu()
@@ -372,7 +369,7 @@ void ResourceEditorPluginPrivate::renamePrefixContextMenu()
auto node = dynamic_cast(ProjectTree::currentNode());
QTC_ASSERT(node, return);
- PrefixLangDialog dialog(tr("Rename Prefix"),
+ PrefixLangDialog dialog(Tr::tr("Rename Prefix"),
node->prefix(),
node->lang(),
Core::ICore::dialogParent());
@@ -471,7 +468,4 @@ void ResourceEditorPlugin::onUndoStackChanged(ResourceEditorW const *editor,
}
}
-} // namespace Internal
-} // namespace ResourceEditor
-
-#include "resourceeditorplugin.moc"
+} // ResourceEditor::Internal
diff --git a/src/plugins/resourceeditor/resourceeditorplugin.h b/src/plugins/resourceeditor/resourceeditorplugin.h
index d1cdba67c8f..ceae1107aa8 100644
--- a/src/plugins/resourceeditor/resourceeditorplugin.h
+++ b/src/plugins/resourceeditor/resourceeditorplugin.h
@@ -27,8 +27,7 @@
#include
-namespace ResourceEditor {
-namespace Internal {
+namespace ResourceEditor::Internal {
class ResourceEditorW;
@@ -49,5 +48,4 @@ private:
class ResourceEditorPluginPrivate *d = nullptr;
};
-} // namespace Internal
-} // namespace ResourceEditor
+} // ResourceEditor::Internal
diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp
index a6a2bedadf8..7d24a44b589 100644
--- a/src/plugins/resourceeditor/resourceeditorw.cpp
+++ b/src/plugins/resourceeditor/resourceeditorw.cpp
@@ -27,9 +27,9 @@
#include "resourceeditorconstants.h"
#include "resourceeditorplugin.h"
-
-#include
-#include
+#include "resourceeditortr.h"
+#include "qrceditor/qrceditor.h"
+#include "qrceditor/resourcefile_p.h"
#include
#include
@@ -46,8 +46,7 @@
using namespace Utils;
-namespace ResourceEditor {
-namespace Internal {
+namespace ResourceEditor::Internal {
enum { debugResourceEditorW = 0 };
@@ -85,13 +84,13 @@ ResourceEditorW::ResourceEditorW(const Core::Context &context,
m_toolBar->addWidget(refreshButton);
m_resourceEditor->setResourceDragEnabled(true);
- m_contextMenu->addAction(tr("Open File"), this, &ResourceEditorW::openCurrentFile);
- m_openWithMenu = m_contextMenu->addMenu(tr("Open With"));
- m_renameAction = m_contextMenu->addAction(tr("Rename File..."), this,
+ m_contextMenu->addAction(Tr::tr("Open File"), this, &ResourceEditorW::openCurrentFile);
+ m_openWithMenu = m_contextMenu->addMenu(Tr::tr("Open With"));
+ m_renameAction = m_contextMenu->addAction(Tr::tr("Rename File..."), this,
&ResourceEditorW::renameCurrentFile);
- m_copyFileNameAction = m_contextMenu->addAction(tr("Copy Resource Path to Clipboard"),
+ m_copyFileNameAction = m_contextMenu->addAction(Tr::tr("Copy Resource Path to Clipboard"),
this, &ResourceEditorW::copyCurrentResourcePath);
- m_orderList = m_contextMenu->addAction(tr("Sort Alphabetically"), this, &ResourceEditorW::orderList);
+ m_orderList = m_contextMenu->addAction(Tr::tr("Sort Alphabetically"), this, &ResourceEditorW::orderList);
connect(m_resourceDocument, &ResourceEditorDocument::loaded,
m_resourceEditor, &QrcEditor::loaded);
@@ -335,5 +334,4 @@ void ResourceEditorW::onRedo()
m_resourceEditor->onRedo();
}
-} // namespace Internal
-} // namespace ResourceEditor
+} // ResourceEditor::Internal
diff --git a/src/plugins/resourceeditor/resourceeditorw.h b/src/plugins/resourceeditor/resourceeditorw.h
index 628c6b138e3..17ffd658301 100644
--- a/src/plugins/resourceeditor/resourceeditorw.h
+++ b/src/plugins/resourceeditor/resourceeditorw.h
@@ -33,8 +33,7 @@ class QMenu;
class QToolBar;
QT_END_NAMESPACE
-namespace ResourceEditor {
-namespace Internal {
+namespace ResourceEditor::Internal {
class RelativeResourceModel;
class ResourceEditorPlugin;
@@ -125,5 +124,4 @@ public:
friend class ResourceEditorDocument;
};
-} // namespace Internal
-} // namespace ResourceEditor
+} // ResourceEditor::Internal