Commit e9e111ff authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppEditor: Fix local renaming

CppLocalRenaming was connected to the initial QPlainTextEdit::document()
and not the "updated" QTextDocument set by
BaseTextEditorWidgetPrivate::setupDocumentSignals().

Broken by

    commit c655d7e5
    CppEditor: Convert to new construction scheme

Change-Id: I2e785a9d62a3bd39d9e613776cfc8e35dd9ff5d4
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 36d8ad4c
......@@ -187,6 +187,8 @@ void CppEditorWidget::finalizeInitialization()
d->m_lastSemanticInfo.localUses = localUses;
});
connect(document(), SIGNAL(contentsChange(int,int,int)),
&d->m_localRenaming, SLOT(onContentsChangeOfEditorWidgetDocument(int,int,int)));
connect(&d->m_localRenaming, &CppLocalRenaming::finished, [this] {
cppEditorDocument()->semanticRehighlight();
});
......
......@@ -68,8 +68,6 @@ CppLocalRenaming::CppLocalRenaming(TextEditor::BaseTextEditorWidget *editorWidge
, m_firstRenameChangeExpected(false)
{
forgetRenamingSelection();
connect(m_editorWidget->document(), SIGNAL(contentsChange(int,int,int)),
this, SLOT(onContentsChangeOfEditorWidgetDocument(int,int,int)));
}
void CppLocalRenaming::updateSelectionsForVariableUnderCursor(
......
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