summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/snippets/snippet.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-01-17 18:02:43 +0100
committerhjk <hjk@qt.io>2023-01-18 07:02:12 +0000
commit17b20e06224f1fdee61fe5477b0789d09d602652 (patch)
tree9b9f1dac81fc4774a1ee1719b9215c0454354aee /src/plugins/texteditor/snippets/snippet.cpp
parent87e5ac74385ffcb8713510c9e243e2455cb17516 (diff)
downloadqt-creator-17b20e06224f1fdee61fe5477b0789d09d602652.tar.gz
TextEditor: Tr::tr
Change-Id: I28aa68e25c53c3a4d1c370074d7b3318944dc45a Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src/plugins/texteditor/snippets/snippet.cpp')
-rw-r--r--src/plugins/texteditor/snippets/snippet.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/plugins/texteditor/snippets/snippet.cpp b/src/plugins/texteditor/snippets/snippet.cpp
index 71ec46c7c6..f41156c4ce 100644
--- a/src/plugins/texteditor/snippets/snippet.cpp
+++ b/src/plugins/texteditor/snippets/snippet.cpp
@@ -3,6 +3,8 @@
#include "snippet.h"
+#include "../texteditortr.h"
+
#include <utils/algorithm.h>
#include <utils/macroexpander.h>
#include <utils/qtcassert.h>
@@ -10,7 +12,7 @@
#include <QTextDocument>
-using namespace TextEditor;
+namespace TextEditor {
const char UCMANGLER_ID[] = "TextEditor::UppercaseMangler";
const char LCMANGLER_ID[] = "TextEditor::LowercaseMangler";
@@ -221,7 +223,7 @@ SnippetParseResult Snippet::parse(const QString &snippet)
}
if (mangler) {
- return SnippetParseResult{SnippetParseError{tr("Expected delimiter after mangler ID."),
+ return SnippetParseResult{SnippetParseError{Tr::tr("Expected delimiter after mangler ID."),
preprocessedSnippet,
i}};
}
@@ -236,7 +238,7 @@ SnippetParseResult Snippet::parse(const QString &snippet)
mangler = &tcMangler;
} else {
return SnippetParseResult{
- SnippetParseError{tr("Expected mangler ID \"l\" (lowercase), \"u\" (uppercase), "
+ SnippetParseError{Tr::tr("Expected mangler ID \"l\" (lowercase), \"u\" (uppercase), "
"or \"c\" (titlecase) after colon."),
preprocessedSnippet,
i}};
@@ -259,7 +261,7 @@ SnippetParseResult Snippet::parse(const QString &snippet)
if (inVar) {
return SnippetParseResult{
- SnippetParseError{tr("Missing closing variable delimiter for:"), currentPart.text, 0}};
+ SnippetParseError{Tr::tr("Missing closing variable delimiter for:"), currentPart.text, 0}};
}
if (!currentPart.text.isEmpty())
@@ -268,6 +270,10 @@ SnippetParseResult Snippet::parse(const QString &snippet)
return SnippetParseResult(result);
}
+} // Texteditor
+
+using namespace TextEditor;
+
#ifdef WITH_TESTS
# include <QTest>