aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cppparsecontext.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2023-01-11 20:43:10 +0100
committerhjk <hjk@qt.io>2023-01-12 06:46:45 +0000
commitf7bcd4f574491211d73752fb953e5af099dcac0c (patch)
tree03c609df6f91caa84df76049af6eff1d508376be /src/plugins/cppeditor/cppparsecontext.cpp
parent85d067af916346d50da515d6f636b29b5dd4dc6c (diff)
CppEditor: Convert to Tr::tr
Change-Id: Ic4025e06e17c45eb6dc2162fb7f21f5b8aebe84d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src/plugins/cppeditor/cppparsecontext.cpp')
-rw-r--r--src/plugins/cppeditor/cppparsecontext.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/cppeditor/cppparsecontext.cpp b/src/plugins/cppeditor/cppparsecontext.cpp
index bf24861a09..554c6ca839 100644
--- a/src/plugins/cppeditor/cppparsecontext.cpp
+++ b/src/plugins/cppeditor/cppparsecontext.cpp
@@ -3,6 +3,7 @@
#include "cppparsecontext.h"
+#include "cppeditortr.h"
#include "cppeditorwidget.h"
#include <QAction>
@@ -30,12 +31,12 @@ QString ParseContextModel::currentToolTip() const
if (!index.isValid())
return QString();
- return tr("<p><b>Active Parse Context</b>:<br/>%1</p>"
- "<p>Multiple parse contexts (set of defines, include paths, and so on) "
- "are available for this file.</p>"
- "<p>Choose a parse context to set it as the preferred one. "
- "Clear the preference from the context menu.</p>")
- .arg(data(index, Qt::ToolTipRole).toString());
+ return Tr::tr("<p><b>Active Parse Context</b>:<br/>%1</p>"
+ "<p>Multiple parse contexts (set of defines, include paths, and so on) "
+ "are available for this file.</p>"
+ "<p>Choose a parse context to set it as the preferred one. "
+ "Clear the preference from the context menu.</p>")
+ .arg(data(index, Qt::ToolTipRole).toString());
}
void ParseContextModel::setPreferred(int index)
@@ -120,7 +121,7 @@ ParseContextWidget::ParseContextWidget(ParseContextModel &parseContextModel, QWi
setSizePolicy(policy);
// Set up context menu with a clear action
setContextMenuPolicy(Qt::ActionsContextMenu);
- m_clearPreferredAction = new QAction(tr("Clear Preferred Parse Context"), this);
+ m_clearPreferredAction = new QAction(Tr::tr("Clear Preferred Parse Context"), this);
connect(m_clearPreferredAction, &QAction::triggered, this, [this] {
m_parseContextModel.clearPreferred();
});