summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2017-10-24 15:12:02 +0200
committerEike Ziller <eike.ziller@qt.io>2017-10-25 07:13:45 +0000
commit1a1681bbcc8a50a365ca915515752644a6961989 (patch)
tree6b6ef68635ede59cb1af6a0d6d13e874c0f05ef0 /src
parentab1107c4979e5799f68d9f4786df3fa68d4f41f6 (diff)
downloadqt-creator-1a1681bbcc8a50a365ca915515752644a6961989.tar.gz
TextEditor: Work around linguist issues
lupdate has issues with resolving non-trivial uses of "using namespace" (QTBUG-64007) Move "using namespace" directive to a place where it is better handled by lupdate. Also use TextEditorWidget instead of *Private as the context. Change-Id: I7d3bb8e1bc493196e47085827be31f97e0dce7b8 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/texteditor/texteditor.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp
index 1b0128350d..6b6b881779 100644
--- a/src/plugins/texteditor/texteditor.cpp
+++ b/src/plugins/texteditor/texteditor.cpp
@@ -150,6 +150,9 @@ using namespace Core;
using namespace Utils;
namespace TextEditor {
+
+using namespace Internal;
+
namespace Internal {
enum { NExtraSelectionKinds = 12 };
@@ -683,8 +686,6 @@ TextEditorWidgetPrivate::~TextEditorWidgetPrivate()
} // namespace Internal
-using namespace Internal;
-
/*!
* Test if syntax highlighter is available (or unneeded) for \a widget.
* If not found, show a warning with a link to the relevant settings page.
@@ -3343,7 +3344,11 @@ bool TextEditorWidgetPrivate::processAnnotaionTooltipRequest(const QTextBlock &b
QFrame* separator = new QFrame();
separator->setFrameShape(QFrame::HLine);
layout->addWidget(separator, layout->rowCount(), 0, 1, -1);
- layout->addWidget(new QLabel(tr("Other annotations:")), layout->rowCount(), 0, 1, -1);
+ layout->addWidget(new QLabel(TextEditorWidget::tr("Other annotations:")),
+ layout->rowCount(),
+ 0,
+ 1,
+ -1);
Utils::sort(marks, [](const TextMark* mark1, const TextMark* mark2){
return mark1->priority() > mark2->priority();