Commit f4ea9777 authored by hjk's avatar hjk
Browse files

TextEditor: Use a signal to clear contents help id.



That's the last user of the internal m_editor back link.

Change-Id: I32b6e617428b72dc713147cb542b726cf33b6562
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 47f10e3b
...@@ -6725,8 +6725,7 @@ void BaseTextEditorWidgetPrivate::updateCursorPosition() ...@@ -6725,8 +6725,7 @@ void BaseTextEditorWidgetPrivate::updateCursorPosition()
.arg(q->textDocument()->tabSettings().columnAt(block.text(), .arg(q->textDocument()->tabSettings().columnAt(block.text(),
column)+1), column)+1),
tr("Line: 9999, Col: 999")); tr("Line: 9999, Col: 999"));
if (m_editor) q->clearContentsHelpId();
m_editor->m_contextHelpId.clear();
if (!block.isVisible()) if (!block.isVisible())
q->ensureCursorVisible(); q->ensureCursorVisible();
...@@ -7331,6 +7330,9 @@ BaseTextEditor *BaseTextEditorFactory::createEditorHelper(const BaseTextDocument ...@@ -7331,6 +7330,9 @@ BaseTextEditor *BaseTextEditorFactory::createEditorHelper(const BaseTextDocument
connect(widget, &BaseTextEditorWidget::activateEditor, connect(widget, &BaseTextEditorWidget::activateEditor,
[editor]() { Core::EditorManager::activateEditor(editor); }); [editor]() { Core::EditorManager::activateEditor(editor); });
connect(widget, &BaseTextEditorWidget::clearContentsHelpId,
[editor]() { editor->setContextHelpId(QString()); });
widget->finalizeInitialization(); widget->finalizeInitialization();
editor->finalizeInitialization(); editor->finalizeInitialization();
......
...@@ -607,6 +607,7 @@ signals: ...@@ -607,6 +607,7 @@ signals:
void tooltipRequested(const QPoint &globalPos, int position); void tooltipRequested(const QPoint &globalPos, int position);
void markTooltipRequested(const QPoint &globalPos, int line); void markTooltipRequested(const QPoint &globalPos, int line);
void activateEditor(); void activateEditor();
void clearContentsHelpId();
protected slots: protected slots:
virtual void slotCursorPositionChanged(); // Used in VcsBase 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