forked from qt-creator/qt-creator
Translations: Use QCoreApplication::translate() instead of tr()
QCoreApplication::translate() takes a context parameter, tr() does not.
We want the first one.
Amends: 48affa1889
Change-Id: Ibca327a39097dfcdb81a30e561161d3275c61d1d
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -162,8 +162,8 @@ public:
|
||||
if (auto parameter = params())
|
||||
return parameter->isValid();
|
||||
if (errorMessage)
|
||||
*errorMessage = QCoreApplication::tr("::LanguageServerProtocol",
|
||||
"No parameters in \"%1\".").arg(method());
|
||||
*errorMessage = QCoreApplication::translate("::LanguageServerProtocol",
|
||||
"No parameters in \"%1\".").arg(method());
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -375,8 +375,8 @@ public:
|
||||
if (id().isValid())
|
||||
return true;
|
||||
if (errorMessage)
|
||||
*errorMessage = QCoreApplication::tr("::LanguageServerProtocol",
|
||||
"No ID set in \"%1\".").arg(this->method());
|
||||
*errorMessage = QCoreApplication::translate("::LanguageServerProtocol",
|
||||
"No ID set in \"%1\".").arg(this->method());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
TestRunConfiguration(ProjectExplorer::Target *parent, TestConfiguration *config)
|
||||
: ProjectExplorer::RunConfiguration(parent, "AutoTest.TestRunConfig")
|
||||
{
|
||||
setDefaultDisplayName(QCoreApplication::tr("::Autotest", "AutoTest Debug"));
|
||||
setDefaultDisplayName(QCoreApplication::translate("::Autotest", "AutoTest Debug"));
|
||||
|
||||
bool enableQuick = false;
|
||||
if (auto debuggable = dynamic_cast<DebuggableTestConfiguration *>(config))
|
||||
|
||||
@@ -46,8 +46,8 @@ private:
|
||||
void toggleThreadRestriction(QAction *action);
|
||||
|
||||
Utils::Perspective m_perspective{Constants::CtfVisualizerPerspectiveId,
|
||||
QCoreApplication::tr("::CtfVisualizer",
|
||||
"Chrome Trace Format Visualizer")};
|
||||
QCoreApplication::translate("::CtfVisualizer",
|
||||
"Chrome Trace Format Visualizer")};
|
||||
|
||||
bool m_isLoading;
|
||||
QScopedPointer<QAction> m_loadJson;
|
||||
|
||||
@@ -14,8 +14,8 @@ class MesonActionsManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Utils::ParameterAction buildTargetContextAction{
|
||||
QCoreApplication::tr("::MesonProjectManager", "Build"),
|
||||
QCoreApplication::tr("::MesonProjectManager", "Build \"%1\""),
|
||||
QCoreApplication::translate("::MesonProjectManager", "Build"),
|
||||
QCoreApplication::translate("::MesonProjectManager", "Build \"%1\""),
|
||||
Utils::ParameterAction::AlwaysEnabled /*handled manually*/
|
||||
};
|
||||
QAction configureActionMenu;
|
||||
|
||||
@@ -83,8 +83,8 @@ private:
|
||||
void finalize();
|
||||
|
||||
Utils::Perspective m_perspective{Constants::PerfProfilerPerspectiveId,
|
||||
QCoreApplication::tr("::PerfProfiler",
|
||||
"Performance Analyzer")};
|
||||
QCoreApplication::translate("::PerfProfiler",
|
||||
"Performance Analyzer")};
|
||||
|
||||
QAction *m_startAction = nullptr;
|
||||
QAction *m_stopAction = nullptr;
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
QWidget *outputWidget(QWidget *) override;
|
||||
QList<QWidget *> toolBarWidgets() const override;
|
||||
QString displayName() const override {
|
||||
return QCoreApplication::tr("::ProjectExplorer","Compile Output"); }
|
||||
return QCoreApplication::translate("::ProjectExplorer","Compile Output"); }
|
||||
int priorityInStatusBar() const override;
|
||||
void clearContents() override;
|
||||
bool canFocus() const override;
|
||||
|
||||
@@ -43,7 +43,7 @@ class ProjectWelcomePage : public Core::IWelcomePage
|
||||
public:
|
||||
ProjectWelcomePage();
|
||||
|
||||
QString title() const override { return QCoreApplication::tr("::ProjectExplorer", "Projects"); }
|
||||
QString title() const override { return QCoreApplication::translate("::ProjectExplorer", "Projects"); }
|
||||
int priority() const override { return 20; }
|
||||
Utils::Id id() const override;
|
||||
QWidget *createWidget() const override;
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
|
||||
QString title() const override
|
||||
{
|
||||
return QCoreApplication::tr("::ScxmlEditor", "Search");
|
||||
return QCoreApplication::translate("::ScxmlEditor", "Search");
|
||||
}
|
||||
|
||||
QIcon icon() const override
|
||||
|
||||
Reference in New Issue
Block a user