Fix lupdate issues

Change-Id: Ib0cbb96a1a4857db5724f9d1e316b97bf2827dbd
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Eike Ziller
2019-11-01 12:21:53 +01:00
parent 7d14132c8c
commit 34e8f58c47
13 changed files with 53 additions and 40 deletions

View File

@@ -251,7 +251,7 @@ public:
QdbDeviceWizard(QWidget *parent) QdbDeviceWizard(QWidget *parent)
: QWizard(parent) : QWizard(parent)
{ {
setWindowTitle(QdbDeviceWizard::tr("Boot2Qt Network Device Setup")); setWindowTitle(QdbDevice::tr("Boot2Qt Network Device Setup"));
settingsPage.setCommitPage(true); settingsPage.setCommitPage(true);
enum { SettingsPageId }; enum { SettingsPageId };

View File

@@ -34,6 +34,8 @@ namespace Internal {
class QdbDevice : public RemoteLinux::LinuxDevice class QdbDevice : public RemoteLinux::LinuxDevice
{ {
Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbDevice)
public: public:
typedef QSharedPointer<QdbDevice> Ptr; typedef QSharedPointer<QdbDevice> Ptr;
typedef QSharedPointer<const QdbDevice> ConstPtr; typedef QSharedPointer<const QdbDevice> ConstPtr;

View File

@@ -39,6 +39,7 @@ namespace Internal {
class CtfStatisticsModel : public QAbstractTableModel class CtfStatisticsModel : public QAbstractTableModel
{ {
Q_OBJECT
public: public:
enum Role { enum Role {

View File

@@ -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(); clearAll();

View File

@@ -107,8 +107,7 @@ GenericProjectPluginPrivate::GenericProjectPluginPrivate()
genericProject->setFiles(transform(sfd.selectedFiles(), &FilePath::toString)); genericProject->setFiles(transform(sfd.selectedFiles(), &FilePath::toString));
}); });
const auto removeDirAction = new QAction(GenericProjectPlugin::tr("Remove Directory"), this);
const auto removeDirAction = new QAction(tr("Remove Directory"), this);
Command * const cmd = ActionManager::registerAction(removeDirAction, "GenericProject.RemoveDir", Command * const cmd = ActionManager::registerAction(removeDirAction, "GenericProject.RemoveDir",
Context(PEC::C_PROJECT_TREE)); Context(PEC::C_PROJECT_TREE));
ActionManager::actionContainer(PEC::M_FOLDERCONTEXT)->addAction(cmd, PEC::G_FOLDER_OTHER); 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(); }), folderNode->findNodes([](const Node *node) { return node->asFileNode(); }),
[](const Node *node) { return node->filePath().toString();}); [](const Node *node) { return node->filePath().toString();});
if (!project->removeFiles(filesToRemove)) { if (!project->removeFiles(filesToRemove)) {
TaskHub::addTask(Task::Error, tr("Project files list update failed."), TaskHub::addTask(Task::Error,
PEC::TASK_CATEGORY_BUILDSYSTEM, project->filesFilePath()); GenericProjectPlugin::tr("Project files list update failed."),
PEC::TASK_CATEGORY_BUILDSYSTEM,
project->filesFilePath());
} }
}); });
} }

View File

@@ -79,14 +79,14 @@ public:
: BuildStepConfigWidget(buildStep), m_buildStep(buildStep) : BuildStepConfigWidget(buildStep), m_buildStep(buildStep)
{ {
auto buildArgumentsLabel = new QLabel(this); auto buildArgumentsLabel = new QLabel(this);
buildArgumentsLabel->setText(tr("Base arguments:")); buildArgumentsLabel->setText(IosBuildStep::tr("Base arguments:"));
m_buildArgumentsTextEdit = new QPlainTextEdit(this); m_buildArgumentsTextEdit = new QPlainTextEdit(this);
m_buildArgumentsTextEdit->setPlainText(QtcProcess::joinArgs(m_buildStep->baseArguments())); m_buildArgumentsTextEdit->setPlainText(QtcProcess::joinArgs(m_buildStep->baseArguments()));
m_resetDefaultsButton = new QPushButton(this); m_resetDefaultsButton = new QPushButton(this);
m_resetDefaultsButton->setLayoutDirection(Qt::RightToLeft); 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); m_resetDefaultsButton->setEnabled(!m_buildStep->m_useDefaultArguments);
auto extraArgumentsLabel = new QLabel(this); auto extraArgumentsLabel = new QLabel(this);
@@ -101,9 +101,9 @@ public:
gridLayout->addWidget(extraArgumentsLabel, 2, 0, 1, 1); gridLayout->addWidget(extraArgumentsLabel, 2, 0, 1, 1);
gridLayout->addWidget(m_extraArgumentsLineEdit, 2, 1, 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(); updateDetails();

View File

@@ -57,10 +57,7 @@ static CommandLine flashAndRunCommand(Target *target)
}); });
} }
class FlashAndRunConfiguration : public ProjectExplorer::RunConfiguration FlashAndRunConfiguration::FlashAndRunConfiguration(Target *target, Core::Id id)
{
public:
FlashAndRunConfiguration(Target *target, Core::Id id)
: RunConfiguration(target, id) : RunConfiguration(target, id)
{ {
auto effectiveFlashAndRunCall = addAspect<BaseStringAspect>(); auto effectiveFlashAndRunCall = addAspect<BaseStringAspect>();
@@ -74,12 +71,12 @@ public:
updateConfiguration(); updateConfiguration();
connect(target->activeBuildConfiguration(), &BuildConfiguration::buildDirectoryChanged, connect(target->activeBuildConfiguration(),
this, updateConfiguration); &BuildConfiguration::buildDirectoryChanged,
connect(target->project(), &Project::displayNameChanged, this,
this, updateConfiguration); updateConfiguration);
connect(target->project(), &Project::displayNameChanged, this, updateConfiguration);
} }
};
class FlashAndRunWorker : public SimpleTargetRunner class FlashAndRunWorker : public SimpleTargetRunner
{ {

View File

@@ -37,6 +37,14 @@ public:
EmrunRunConfigurationFactory(); EmrunRunConfigurationFactory();
}; };
class FlashAndRunConfiguration : public ProjectExplorer::RunConfiguration
{
Q_OBJECT
public:
FlashAndRunConfiguration(ProjectExplorer::Target *target, Core::Id id);
};
ProjectExplorer::RunWorkerFactory::WorkerCreator makeFlashAndRunWorker(); ProjectExplorer::RunWorkerFactory::WorkerCreator makeFlashAndRunWorker();
} // namespace Internal } // namespace Internal

View File

@@ -62,9 +62,9 @@ public:
, m_executable(new Utils::PathChooser()) , m_executable(new Utils::PathChooser())
{ {
auto mainLayout = new QGridLayout(); 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(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); mainLayout->addWidget(m_executable, 1, 1);
m_executable->setExpectedKind(Utils::PathChooser::ExistingCommand); m_executable->setExpectedKind(Utils::PathChooser::ExistingCommand);
setLayout(mainLayout); setLayout(mainLayout);
@@ -138,12 +138,12 @@ InterpreterOptionsWidget::InterpreterOptionsWidget(const QList<Interpreter> &int
this, this,
&InterpreterOptionsWidget::currentChanged); &InterpreterOptionsWidget::currentChanged);
auto buttonLayout = new QVBoxLayout(); 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); 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); m_deleteButton->setEnabled(false);
connect(m_deleteButton, &QPushButton::pressed, this, &InterpreterOptionsWidget::deleteItem); 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); m_makeDefaultButton->setEnabled(false);
connect(m_makeDefaultButton, &QPushButton::pressed, this, &InterpreterOptionsWidget::makeDefault); connect(m_makeDefaultButton, &QPushButton::pressed, this, &InterpreterOptionsWidget::makeDefault);
mainLayout->addLayout(layout); mainLayout->addLayout(layout);
@@ -230,9 +230,9 @@ private:
InterpreterOptionsPage::InterpreterOptionsPage() InterpreterOptionsPage::InterpreterOptionsPage()
{ {
setId(Constants::C_PYTHONOPTIONS_PAGE_ID); setId(Constants::C_PYTHONOPTIONS_PAGE_ID);
setDisplayName(tr("Interpreters")); setDisplayName(PythonSettings::tr("Interpreters"));
setCategory(Constants::C_PYTHON_SETTINGS_CATEGORY); setCategory(Constants::C_PYTHON_SETTINGS_CATEGORY);
setDisplayCategory(tr("Python")); setDisplayCategory(PythonSettings::tr("Python"));
setCategoryIcon(Utils::Icon({{":/python/images/settingscategory_python.png", setCategoryIcon(Utils::Icon({{":/python/images/settingscategory_python.png",
Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint)); Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint));
} }
@@ -385,7 +385,7 @@ static void addPythonsFromRegistry(QList<Interpreter> &pythons)
const FilePath &executable = FilePath::fromUserInput(regVal.toString()); const FilePath &executable = FilePath::fromUserInput(regVal.toString());
if (executable.exists() && !alreadyRegistered(pythons, executable)) { if (executable.exists() && !alreadyRegistered(pythons, executable)) {
pythons << Interpreter{QUuid::createUuid().toString(), pythons << Interpreter{QUuid::createUuid().toString(),
name + InterpreterOptionsPage::tr(" (Windowed)"), name + PythonSettings::tr(" (Windowed)"),
FilePath::fromUserInput(regVal.toString())}; FilePath::fromUserInput(regVal.toString())};
} }
} }

View File

@@ -200,7 +200,7 @@ QmlPreviewPluginPrivate::QmlPreviewPluginPrivate(QmlPreviewPlugin *parent)
Core::Context projectTreeContext(Constants::C_PROJECT_TREE); Core::Context projectTreeContext(Constants::C_PROJECT_TREE);
menu = Core::ActionManager::actionContainer(Constants::M_FILECONTEXT); 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); action->setEnabled(false);
connect(q, &QmlPreviewPlugin::runningPreviewsChanged, connect(q, &QmlPreviewPlugin::runningPreviewsChanged,
action, [action](const QmlPreviewRunControlList &previews) { action, [action](const QmlPreviewRunControlList &previews) {

View File

@@ -32,6 +32,8 @@ namespace Internal {
class QnxQmlProfilerSupport : public ProjectExplorer::SimpleTargetRunner class QnxQmlProfilerSupport : public ProjectExplorer::SimpleTargetRunner
{ {
Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::QnxQmlProfilerSupport)
public: public:
explicit QnxQmlProfilerSupport(ProjectExplorer::RunControl *runControl); explicit QnxQmlProfilerSupport(ProjectExplorer::RunControl *runControl);
}; };

View File

@@ -68,7 +68,7 @@ public:
auto webBrowserAspect = addAspect<WebBrowserSelectionAspect>(target); auto webBrowserAspect = addAspect<WebBrowserSelectionAspect>(target);
auto effectiveEmrunCall = addAspect<BaseStringAspect>(); auto effectiveEmrunCall = addAspect<BaseStringAspect>();
effectiveEmrunCall->setLabelText(tr("Effective emrun call:")); effectiveEmrunCall->setLabelText(EmrunRunConfigurationFactory::tr("Effective emrun call:"));
effectiveEmrunCall->setDisplayStyle(BaseStringAspect::TextEditDisplay); effectiveEmrunCall->setDisplayStyle(BaseStringAspect::TextEditDisplay);
effectiveEmrunCall->setReadOnly(true); effectiveEmrunCall->setReadOnly(true);
@@ -117,7 +117,7 @@ RunWorkerFactory::WorkerCreator makeEmrunWorker()
// Factories // Factories
EmrunRunConfigurationFactory::EmrunRunConfigurationFactory() EmrunRunConfigurationFactory::EmrunRunConfigurationFactory()
: FixedRunConfigurationFactory(EmrunRunConfiguration::tr("Launch with emrun")) : FixedRunConfigurationFactory(EmrunRunConfigurationFactory::tr("Launch with emrun"))
{ {
registerRunConfiguration<EmrunRunConfiguration>(Constants::WEBASSEMBLY_RUNCONFIGURATION_EMRUN); registerRunConfiguration<EmrunRunConfiguration>(Constants::WEBASSEMBLY_RUNCONFIGURATION_EMRUN);
addSupportedTargetDeviceType(Constants::WEBASSEMBLY_DEVICE_TYPE); addSupportedTargetDeviceType(Constants::WEBASSEMBLY_DEVICE_TYPE);

View File

@@ -33,6 +33,8 @@ namespace Internal {
class EmrunRunConfigurationFactory : public ProjectExplorer::FixedRunConfigurationFactory class EmrunRunConfigurationFactory : public ProjectExplorer::FixedRunConfigurationFactory
{ {
Q_DECLARE_TR_FUNCTIONS(WebAssembly::Internal::EmrunRunConfigurationFactory)
public: public:
EmrunRunConfigurationFactory(); EmrunRunConfigurationFactory();
}; };