Commit 6109ec90 authored by hjk's avatar hjk
Browse files

TextEditor: Introduce a *Widget::activateEditor signal



For communication with the EditorManager without explicitly
using the editor() member.

Change-Id: I89882201924682111365b28804aed28c967bd442
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 70d436a6
......@@ -256,7 +256,7 @@ void CppEditorOutline::gotoSymbolInEditor()
Core::EditorManager::cutForwardNavigationHistory();
Core::EditorManager::addCurrentPositionToNavigationHistory();
m_editorWidget->gotoLine(link.targetLine, link.targetColumn);
Core::EditorManager::activateEditor(m_editorWidget->editor());
m_editorWidget->activateEditor();
}
QModelIndex CppEditorOutline::indexForPosition(int line, int column,
......
......@@ -7337,6 +7337,9 @@ BaseTextEditor *BaseTextEditorFactory::createEditorHelper(const BaseTextDocument
editor->markTooltipRequested(editor, globalPos, line);
});
connect(widget, &BaseTextEditorWidget::activateEditor,
[editor]() { Core::EditorManager::activateEditor(editor); });
widget->finalizeInitialization();
editor->finalizeInitialization();
......
......@@ -608,6 +608,7 @@ signals:
void tooltipOverrideRequested(const QPoint &globalPos, int position, bool *handled);
void tooltipRequested(const QPoint &globalPos, int position);
void markTooltipRequested(const QPoint &globalPos, int line);
void activateEditor();
protected slots:
virtual void slotCursorPositionChanged(); // Used in VcsBase
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment