diff options
-rw-r--r-- | src/plugins/boot2qt/qdbdevice.cpp | 2 | ||||
-rw-r--r-- | src/plugins/boot2qt/qdbdevice.h | 2 | ||||
-rw-r--r-- | src/plugins/ctfvisualizer/ctfstatisticsmodel.h | 1 | ||||
-rw-r--r-- | src/plugins/ctfvisualizer/ctftracemanager.cpp | 2 | ||||
-rw-r--r-- | src/plugins/genericprojectmanager/genericprojectplugin.cpp | 9 | ||||
-rw-r--r-- | src/plugins/ios/iosbuildstep.cpp | 8 | ||||
-rw-r--r-- | src/plugins/mcusupport/mcusupportrunconfiguration.cpp | 35 | ||||
-rw-r--r-- | src/plugins/mcusupport/mcusupportrunconfiguration.h | 8 | ||||
-rw-r--r-- | src/plugins/python/pythonsettings.cpp | 16 | ||||
-rw-r--r-- | src/plugins/qmlpreview/qmlpreviewplugin.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qnx/qnxanalyzesupport.h | 2 | ||||
-rw-r--r-- | src/plugins/webassembly/webassemblyrunconfiguration.cpp | 4 | ||||
-rw-r--r-- | src/plugins/webassembly/webassemblyrunconfiguration.h | 2 |
13 files changed, 53 insertions, 40 deletions
diff --git a/src/plugins/boot2qt/qdbdevice.cpp b/src/plugins/boot2qt/qdbdevice.cpp index e8b8186b50..2f1ae79b00 100644 --- a/src/plugins/boot2qt/qdbdevice.cpp +++ b/src/plugins/boot2qt/qdbdevice.cpp @@ -251,7 +251,7 @@ public: QdbDeviceWizard(QWidget *parent) : QWizard(parent) { - setWindowTitle(QdbDeviceWizard::tr("Boot2Qt Network Device Setup")); + setWindowTitle(QdbDevice::tr("Boot2Qt Network Device Setup")); settingsPage.setCommitPage(true); enum { SettingsPageId }; diff --git a/src/plugins/boot2qt/qdbdevice.h b/src/plugins/boot2qt/qdbdevice.h index a0f6f9338f..214db74a52 100644 --- a/src/plugins/boot2qt/qdbdevice.h +++ b/src/plugins/boot2qt/qdbdevice.h @@ -34,6 +34,8 @@ namespace Internal { class QdbDevice : public RemoteLinux::LinuxDevice { + Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbDevice) + public: typedef QSharedPointer<QdbDevice> Ptr; typedef QSharedPointer<const QdbDevice> ConstPtr; diff --git a/src/plugins/ctfvisualizer/ctfstatisticsmodel.h b/src/plugins/ctfvisualizer/ctfstatisticsmodel.h index 10af0b8b3a..38c27100a1 100644 --- a/src/plugins/ctfvisualizer/ctfstatisticsmodel.h +++ b/src/plugins/ctfvisualizer/ctfstatisticsmodel.h @@ -39,6 +39,7 @@ namespace Internal { class CtfStatisticsModel : public QAbstractTableModel { + Q_OBJECT public: enum Role { diff --git a/src/plugins/ctfvisualizer/ctftracemanager.cpp b/src/plugins/ctfvisualizer/ctftracemanager.cpp index 855f834128..6ebd13e026 100644 --- a/src/plugins/ctfvisualizer/ctftracemanager.cpp +++ b/src/plugins/ctfvisualizer/ctftracemanager.cpp @@ -154,7 +154,7 @@ void CtfTraceManager::addEvent(const json &event) } } -void CtfVisualizer::Internal::CtfTraceManager::load(const QString &filename) +void CtfTraceManager::load(const QString &filename) { clearAll(); diff --git a/src/plugins/genericprojectmanager/genericprojectplugin.cpp b/src/plugins/genericprojectmanager/genericprojectplugin.cpp index 0ffa12e2cf..d3c7db2bfa 100644 --- a/src/plugins/genericprojectmanager/genericprojectplugin.cpp +++ b/src/plugins/genericprojectmanager/genericprojectplugin.cpp @@ -107,8 +107,7 @@ GenericProjectPluginPrivate::GenericProjectPluginPrivate() genericProject->setFiles(transform(sfd.selectedFiles(), &FilePath::toString)); }); - - const auto removeDirAction = new QAction(tr("Remove Directory"), this); + const auto removeDirAction = new QAction(GenericProjectPlugin::tr("Remove Directory"), this); Command * const cmd = ActionManager::registerAction(removeDirAction, "GenericProject.RemoveDir", Context(PEC::C_PROJECT_TREE)); ActionManager::actionContainer(PEC::M_FOLDERCONTEXT)->addAction(cmd, PEC::G_FOLDER_OTHER); @@ -121,8 +120,10 @@ GenericProjectPluginPrivate::GenericProjectPluginPrivate() folderNode->findNodes([](const Node *node) { return node->asFileNode(); }), [](const Node *node) { return node->filePath().toString();}); if (!project->removeFiles(filesToRemove)) { - TaskHub::addTask(Task::Error, tr("Project files list update failed."), - PEC::TASK_CATEGORY_BUILDSYSTEM, project->filesFilePath()); + TaskHub::addTask(Task::Error, + GenericProjectPlugin::tr("Project files list update failed."), + PEC::TASK_CATEGORY_BUILDSYSTEM, + project->filesFilePath()); } }); } diff --git a/src/plugins/ios/iosbuildstep.cpp b/src/plugins/ios/iosbuildstep.cpp index 2ca3db2743..bbcc3937f6 100644 --- a/src/plugins/ios/iosbuildstep.cpp +++ b/src/plugins/ios/iosbuildstep.cpp @@ -79,14 +79,14 @@ public: : BuildStepConfigWidget(buildStep), m_buildStep(buildStep) { auto buildArgumentsLabel = new QLabel(this); - buildArgumentsLabel->setText(tr("Base arguments:")); + buildArgumentsLabel->setText(IosBuildStep::tr("Base arguments:")); m_buildArgumentsTextEdit = new QPlainTextEdit(this); m_buildArgumentsTextEdit->setPlainText(QtcProcess::joinArgs(m_buildStep->baseArguments())); m_resetDefaultsButton = new QPushButton(this); m_resetDefaultsButton->setLayoutDirection(Qt::RightToLeft); - m_resetDefaultsButton->setText(tr("Reset Defaults")); + m_resetDefaultsButton->setText(IosBuildStep::tr("Reset Defaults")); m_resetDefaultsButton->setEnabled(!m_buildStep->m_useDefaultArguments); auto extraArgumentsLabel = new QLabel(this); @@ -101,9 +101,9 @@ public: gridLayout->addWidget(extraArgumentsLabel, 2, 0, 1, 1); gridLayout->addWidget(m_extraArgumentsLineEdit, 2, 1, 1, 1); - extraArgumentsLabel->setText(tr("Extra arguments:")); + extraArgumentsLabel->setText(IosBuildStep::tr("Extra arguments:")); - setDisplayName(tr("iOS build", "iOS BuildStep display name.")); + setDisplayName(IosBuildStep::tr("iOS build", "iOS BuildStep display name.")); updateDetails(); diff --git a/src/plugins/mcusupport/mcusupportrunconfiguration.cpp b/src/plugins/mcusupport/mcusupportrunconfiguration.cpp index 4ec72227e1..c1c8a1f7a4 100644 --- a/src/plugins/mcusupport/mcusupportrunconfiguration.cpp +++ b/src/plugins/mcusupport/mcusupportrunconfiguration.cpp @@ -57,29 +57,26 @@ static CommandLine flashAndRunCommand(Target *target) }); } -class FlashAndRunConfiguration : public ProjectExplorer::RunConfiguration +FlashAndRunConfiguration::FlashAndRunConfiguration(Target *target, Core::Id id) + : RunConfiguration(target, id) { -public: - FlashAndRunConfiguration(Target *target, Core::Id id) - : RunConfiguration(target, id) - { - auto effectiveFlashAndRunCall = addAspect<BaseStringAspect>(); - effectiveFlashAndRunCall->setLabelText(tr("Effective flash and run call:")); - effectiveFlashAndRunCall->setDisplayStyle(BaseStringAspect::TextEditDisplay); - effectiveFlashAndRunCall->setReadOnly(true); + auto effectiveFlashAndRunCall = addAspect<BaseStringAspect>(); + effectiveFlashAndRunCall->setLabelText(tr("Effective flash and run call:")); + effectiveFlashAndRunCall->setDisplayStyle(BaseStringAspect::TextEditDisplay); + effectiveFlashAndRunCall->setReadOnly(true); - auto updateConfiguration = [target, effectiveFlashAndRunCall] { - effectiveFlashAndRunCall->setValue(flashAndRunCommand(target).toUserOutput()); - }; + auto updateConfiguration = [target, effectiveFlashAndRunCall] { + effectiveFlashAndRunCall->setValue(flashAndRunCommand(target).toUserOutput()); + }; - updateConfiguration(); + updateConfiguration(); - connect(target->activeBuildConfiguration(), &BuildConfiguration::buildDirectoryChanged, - this, updateConfiguration); - connect(target->project(), &Project::displayNameChanged, - this, updateConfiguration); - } -}; + connect(target->activeBuildConfiguration(), + &BuildConfiguration::buildDirectoryChanged, + this, + updateConfiguration); + connect(target->project(), &Project::displayNameChanged, this, updateConfiguration); +} class FlashAndRunWorker : public SimpleTargetRunner { diff --git a/src/plugins/mcusupport/mcusupportrunconfiguration.h b/src/plugins/mcusupport/mcusupportrunconfiguration.h index 2ab9c65380..b53eea03a4 100644 --- a/src/plugins/mcusupport/mcusupportrunconfiguration.h +++ b/src/plugins/mcusupport/mcusupportrunconfiguration.h @@ -37,6 +37,14 @@ public: EmrunRunConfigurationFactory(); }; +class FlashAndRunConfiguration : public ProjectExplorer::RunConfiguration +{ + Q_OBJECT + +public: + FlashAndRunConfiguration(ProjectExplorer::Target *target, Core::Id id); +}; + ProjectExplorer::RunWorkerFactory::WorkerCreator makeFlashAndRunWorker(); } // namespace Internal diff --git a/src/plugins/python/pythonsettings.cpp b/src/plugins/python/pythonsettings.cpp index ab5f024765..567d773511 100644 --- a/src/plugins/python/pythonsettings.cpp +++ b/src/plugins/python/pythonsettings.cpp @@ -62,9 +62,9 @@ public: , m_executable(new Utils::PathChooser()) { auto mainLayout = new QGridLayout(); - mainLayout->addWidget(new QLabel(tr("Name:")), 0, 0); + mainLayout->addWidget(new QLabel(PythonSettings::tr("Name:")), 0, 0); mainLayout->addWidget(m_name, 0, 1); - mainLayout->addWidget(new QLabel(tr("Executable")), 1, 0); + mainLayout->addWidget(new QLabel(PythonSettings::tr("Executable")), 1, 0); mainLayout->addWidget(m_executable, 1, 1); m_executable->setExpectedKind(Utils::PathChooser::ExistingCommand); setLayout(mainLayout); @@ -138,12 +138,12 @@ InterpreterOptionsWidget::InterpreterOptionsWidget(const QList<Interpreter> &int this, &InterpreterOptionsWidget::currentChanged); auto buttonLayout = new QVBoxLayout(); - auto addButton = new QPushButton(InterpreterOptionsWidget::tr("&Add")); + auto addButton = new QPushButton(PythonSettings::tr("&Add")); connect(addButton, &QPushButton::pressed, this, &InterpreterOptionsWidget::addItem); - m_deleteButton = new QPushButton(InterpreterOptionsWidget::tr("&Delete")); + m_deleteButton = new QPushButton(PythonSettings::tr("&Delete")); m_deleteButton->setEnabled(false); connect(m_deleteButton, &QPushButton::pressed, this, &InterpreterOptionsWidget::deleteItem); - m_makeDefaultButton = new QPushButton(InterpreterOptionsWidget::tr("&Make Default")); + m_makeDefaultButton = new QPushButton(PythonSettings::tr("&Make Default")); m_makeDefaultButton->setEnabled(false); connect(m_makeDefaultButton, &QPushButton::pressed, this, &InterpreterOptionsWidget::makeDefault); mainLayout->addLayout(layout); @@ -230,9 +230,9 @@ private: InterpreterOptionsPage::InterpreterOptionsPage() { setId(Constants::C_PYTHONOPTIONS_PAGE_ID); - setDisplayName(tr("Interpreters")); + setDisplayName(PythonSettings::tr("Interpreters")); setCategory(Constants::C_PYTHON_SETTINGS_CATEGORY); - setDisplayCategory(tr("Python")); + setDisplayCategory(PythonSettings::tr("Python")); setCategoryIcon(Utils::Icon({{":/python/images/settingscategory_python.png", Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint)); } @@ -385,7 +385,7 @@ static void addPythonsFromRegistry(QList<Interpreter> &pythons) const FilePath &executable = FilePath::fromUserInput(regVal.toString()); if (executable.exists() && !alreadyRegistered(pythons, executable)) { pythons << Interpreter{QUuid::createUuid().toString(), - name + InterpreterOptionsPage::tr(" (Windowed)"), + name + PythonSettings::tr(" (Windowed)"), FilePath::fromUserInput(regVal.toString())}; } } diff --git a/src/plugins/qmlpreview/qmlpreviewplugin.cpp b/src/plugins/qmlpreview/qmlpreviewplugin.cpp index 876cdb962a..a5fd38fd2e 100644 --- a/src/plugins/qmlpreview/qmlpreviewplugin.cpp +++ b/src/plugins/qmlpreview/qmlpreviewplugin.cpp @@ -200,7 +200,7 @@ QmlPreviewPluginPrivate::QmlPreviewPluginPrivate(QmlPreviewPlugin *parent) Core::Context projectTreeContext(Constants::C_PROJECT_TREE); menu = Core::ActionManager::actionContainer(Constants::M_FILECONTEXT); - action = new QAction(tr("Preview File"), this); + action = new QAction(QmlPreviewPlugin::tr("Preview File"), this); action->setEnabled(false); connect(q, &QmlPreviewPlugin::runningPreviewsChanged, action, [action](const QmlPreviewRunControlList &previews) { diff --git a/src/plugins/qnx/qnxanalyzesupport.h b/src/plugins/qnx/qnxanalyzesupport.h index bcf92ae0a0..3c99214197 100644 --- a/src/plugins/qnx/qnxanalyzesupport.h +++ b/src/plugins/qnx/qnxanalyzesupport.h @@ -32,6 +32,8 @@ namespace Internal { class QnxQmlProfilerSupport : public ProjectExplorer::SimpleTargetRunner { + Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::QnxQmlProfilerSupport) + public: explicit QnxQmlProfilerSupport(ProjectExplorer::RunControl *runControl); }; diff --git a/src/plugins/webassembly/webassemblyrunconfiguration.cpp b/src/plugins/webassembly/webassemblyrunconfiguration.cpp index f4c56630fd..9e0b318547 100644 --- a/src/plugins/webassembly/webassemblyrunconfiguration.cpp +++ b/src/plugins/webassembly/webassemblyrunconfiguration.cpp @@ -68,7 +68,7 @@ public: auto webBrowserAspect = addAspect<WebBrowserSelectionAspect>(target); auto effectiveEmrunCall = addAspect<BaseStringAspect>(); - effectiveEmrunCall->setLabelText(tr("Effective emrun call:")); + effectiveEmrunCall->setLabelText(EmrunRunConfigurationFactory::tr("Effective emrun call:")); effectiveEmrunCall->setDisplayStyle(BaseStringAspect::TextEditDisplay); effectiveEmrunCall->setReadOnly(true); @@ -117,7 +117,7 @@ RunWorkerFactory::WorkerCreator makeEmrunWorker() // Factories EmrunRunConfigurationFactory::EmrunRunConfigurationFactory() - : FixedRunConfigurationFactory(EmrunRunConfiguration::tr("Launch with emrun")) + : FixedRunConfigurationFactory(EmrunRunConfigurationFactory::tr("Launch with emrun")) { registerRunConfiguration<EmrunRunConfiguration>(Constants::WEBASSEMBLY_RUNCONFIGURATION_EMRUN); addSupportedTargetDeviceType(Constants::WEBASSEMBLY_DEVICE_TYPE); diff --git a/src/plugins/webassembly/webassemblyrunconfiguration.h b/src/plugins/webassembly/webassemblyrunconfiguration.h index af6af51e81..d58db86d3c 100644 --- a/src/plugins/webassembly/webassemblyrunconfiguration.h +++ b/src/plugins/webassembly/webassemblyrunconfiguration.h @@ -33,6 +33,8 @@ namespace Internal { class EmrunRunConfigurationFactory : public ProjectExplorer::FixedRunConfigurationFactory { + Q_DECLARE_TR_FUNCTIONS(WebAssembly::Internal::EmrunRunConfigurationFactory) + public: EmrunRunConfigurationFactory(); }; |