diff --git a/src/libs/utils/detailsbutton.h b/src/libs/utils/detailsbutton.h index 7a1ac96b04d..8895418f805 100644 --- a/src/libs/utils/detailsbutton.h +++ b/src/libs/utils/detailsbutton.h @@ -5,6 +5,7 @@ #include "utils_global.h" +#include #include QT_BEGIN_NAMESPACE @@ -44,6 +45,7 @@ public: class QTCREATOR_UTILS_EXPORT DetailsButton : public ExpandButton { + Q_DECLARE_TR_FUNCTIONS(Utils::DetailsButton); public: DetailsButton(QWidget *parent = nullptr); QSize sizeHint() const override; diff --git a/src/plugins/clangtools/clangtool.h b/src/plugins/clangtools/clangtool.h index bd33e31ebc6..34f5eafec15 100644 --- a/src/plugins/clangtools/clangtool.h +++ b/src/plugins/clangtools/clangtool.h @@ -161,7 +161,8 @@ private: QAction *m_clear = nullptr; QAction *m_expandCollapse = nullptr; - Utils::Perspective m_perspective{ClangTidyClazyPerspectiveId, tr("Clang-Tidy and Clazy")}; + Utils::Perspective m_perspective{ClangTidyClazyPerspectiveId, + ::ClangTools::Internal::ClangTool::tr("Clang-Tidy and Clazy")}; private: const QString m_name; diff --git a/src/plugins/cppcheck/cppcheckplugin.cpp b/src/plugins/cppcheck/cppcheckplugin.cpp index c40f1ee6c66..18c4df53481 100644 --- a/src/plugins/cppcheck/cppcheckplugin.cpp +++ b/src/plugins/cppcheck/cppcheckplugin.cpp @@ -39,7 +39,8 @@ public: CppcheckOptionsPage options; DiagnosticsModel manualRunModel; CppcheckTool manualRunTool; - Utils::Perspective perspective{Constants::PERSPECTIVE_ID, CppcheckPlugin::tr("Cppcheck")}; + Utils::Perspective perspective{Constants::PERSPECTIVE_ID, + ::Cppcheck::Internal::CppcheckPlugin::tr("Cppcheck")}; QAction *manualRunAction; void startManualRun(); diff --git a/src/plugins/ctfvisualizer/ctfvisualizertool.h b/src/plugins/ctfvisualizer/ctfvisualizertool.h index bd31a8042d3..b3f31cbb970 100644 --- a/src/plugins/ctfvisualizer/ctfvisualizertool.h +++ b/src/plugins/ctfvisualizer/ctfvisualizertool.h @@ -46,7 +46,7 @@ private: void toggleThreadRestriction(QAction *action); Utils::Perspective m_perspective{Constants::CtfVisualizerPerspectiveId, - Tr::tr("Chrome Trace Format Visualizer")}; + ::CtfVisualizer::Tr::tr("Chrome Trace Format Visualizer")}; bool m_isLoading; QScopedPointer m_loadJson; diff --git a/src/plugins/mesonprojectmanager/mesonactionsmanager.h b/src/plugins/mesonprojectmanager/mesonactionsmanager.h index 8cf00599f2c..55c1dd51814 100644 --- a/src/plugins/mesonprojectmanager/mesonactionsmanager.h +++ b/src/plugins/mesonprojectmanager/mesonactionsmanager.h @@ -14,7 +14,8 @@ class MesonActionsManager : public QObject { Q_OBJECT Utils::ParameterAction buildTargetContextAction{ - Tr::tr("Build"), Tr::tr("Build \"%1\""), + ::MesonProjectManager::Tr::tr("Build"), + ::MesonProjectManager::Tr::tr("Build \"%1\""), Utils::ParameterAction::AlwaysEnabled /*handled manually*/ }; QAction configureActionMenu; diff --git a/src/plugins/perfprofiler/perfprofilertool.h b/src/plugins/perfprofiler/perfprofilertool.h index bfa6598ca0a..4face4dfe5e 100644 --- a/src/plugins/perfprofiler/perfprofilertool.h +++ b/src/plugins/perfprofiler/perfprofilertool.h @@ -79,7 +79,7 @@ private: void finalize(); Utils::Perspective m_perspective{Constants::PerfProfilerPerspectiveId, - Tr::tr("Performance Analyzer")}; + ::PerfProfiler::Tr::tr("Performance Analyzer")}; QAction *m_startAction = nullptr; QAction *m_stopAction = nullptr; diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index db57d6f2bca..c6ee39013b0 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -2239,7 +2239,7 @@ void ProjectExplorerPlugin::extensionsInitialized() BuildManager::extensionsInitialized(); TaskHub::addCategory(Constants::TASK_CATEGORY_SANITIZER, tr("Sanitizer", "Category for sanitizer issues listed under 'Issues'")); - TaskHub::addCategory(Constants::TASK_CATEGORY_TASKLIST_ID, tr("My Tasks")); + TaskHub::addCategory(Constants::TASK_CATEGORY_TASKLIST_ID, TaskFile::tr("My Tasks")); SshSettings::loadSettings(Core::ICore::settings()); const auto searchPathRetriever = [] { diff --git a/src/plugins/projectexplorer/taskfile.cpp b/src/plugins/projectexplorer/taskfile.cpp index c3f89cfc3b1..9ba6a3617a3 100644 --- a/src/plugins/projectexplorer/taskfile.cpp +++ b/src/plugins/projectexplorer/taskfile.cpp @@ -104,8 +104,8 @@ static bool parseTaskFile(QString *errorString, const FilePath &name) { QFile tf(name.toString()); if (!tf.open(QIODevice::ReadOnly)) { - *errorString = ProjectExplorerPlugin::tr("Cannot open task file %1: %2").arg( - name.toUserOutput(), tf.errorString()); + *errorString = TaskFile::tr("Cannot open task file %1: %2") + .arg(name.toUserOutput(), tf.errorString()); return false; } diff --git a/src/plugins/projectexplorer/taskfile.h b/src/plugins/projectexplorer/taskfile.h index 9676c1553d5..5286267dd3f 100644 --- a/src/plugins/projectexplorer/taskfile.h +++ b/src/plugins/projectexplorer/taskfile.h @@ -20,6 +20,7 @@ public: class TaskFile : public Core::IDocument { + Q_DECLARE_TR_FUNCTIONS(TaskList::Internal::TaskListPlugin) public: TaskFile(QObject *parent); diff --git a/src/plugins/texteditor/highlightersettingspage.cpp b/src/plugins/texteditor/highlightersettingspage.cpp index bee80c1a243..3e1067651a2 100644 --- a/src/plugins/texteditor/highlightersettingspage.cpp +++ b/src/plugins/texteditor/highlightersettingspage.cpp @@ -28,6 +28,7 @@ namespace Internal { class HighlighterSettingsPageWidget : public QWidget { + Q_DECLARE_TR_FUNCTIONS(TextEditor::Internal::HighlighterSettingsPage) public: QLabel *definitionsInfolabel; QPushButton *downloadDefinitions; diff --git a/src/plugins/vcsbase/vcscommand.cpp b/src/plugins/vcsbase/vcscommand.cpp index c62508d57bc..b622fff3173 100644 --- a/src/plugins/vcsbase/vcscommand.cpp +++ b/src/plugins/vcsbase/vcscommand.cpp @@ -94,13 +94,13 @@ QString VcsCommandPrivate::displayName() const if (!m_displayName.isEmpty()) return m_displayName; if (m_jobs.isEmpty()) - return tr("Unknown"); + return VcsCommand::tr("UNKNOWN"); const Job &job = m_jobs.at(0); QString result = job.command.executable().baseName(); if (!result.isEmpty()) result[0] = result.at(0).toTitleCase(); else - result = tr("UNKNOWN"); + result = VcsCommand::tr("UNKNOWN"); if (!job.command.arguments().isEmpty()) result += ' ' + job.command.splitArguments().at(0); return result;