diff options
author | hjk <hjk121@nokiamail.com> | 2014-09-02 09:01:31 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-09-02 09:14:10 +0200 |
commit | fcf5c0ea202105ed17e1bc321993c5a3bc72d546 (patch) | |
tree | a1300d81c27a38fcb617a54700d230de100662e4 /src/plugins/texteditor/basetexteditor.cpp | |
parent | 5941345ffc7406e5c53a604dfef59fc0659e4276 (diff) |
TextEditor: Move cursor position label connection
... to a place where there's no need to call editor()
Change-Id: I0fcebcf8b36602bf48373a6b57d8a709cc2a7e81
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/texteditor/basetexteditor.cpp')
-rw-r--r-- | src/plugins/texteditor/basetexteditor.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index f6d049d215..6c26e25aca 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -524,14 +524,6 @@ BaseTextEditorWidgetPrivate::BaseTextEditorWidgetPrivate(BaseTextEditorWidget *p m_cursorPositionLabelAction = m_toolBar->addWidget(m_cursorPositionLabel); m_fileEncodingLabelAction = m_toolBar->addWidget(m_fileEncodingLabel); - - connect(m_cursorPositionLabel, &LineColumnLabel::clicked, [this] { - EditorManager::activateEditor(q->editor(), EditorManager::IgnoreNavigationHistory); - if (Core::Command *cmd = ActionManager::command(Core::Constants::GOTO)) { - if (QAction *act = cmd->action()) - act->trigger(); - } - }); } } // namespace Internal @@ -7329,6 +7321,13 @@ BaseTextEditor *BaseTextEditorFactory::createEditorHelper(const BaseTextDocument widget->finalizeInitialization(); editor->finalizeInitialization(); + connect(widget->d->m_cursorPositionLabel, &LineColumnLabel::clicked, [editor] { + EditorManager::activateEditor(editor, EditorManager::IgnoreNavigationHistory); + if (Core::Command *cmd = ActionManager::command(Core::Constants::GOTO)) { + if (QAction *act = cmd->action()) + act->trigger(); + } + }); return editor; } |