forked from qt-creator/qt-creator
CppEditor: Fix local renaming
CppLocalRenaming was connected to the initial QPlainTextEdit::document()
and not the "updated" QTextDocument set by
BaseTextEditorWidgetPrivate::setupDocumentSignals().
Broken by
commit c655d7e598
CppEditor: Convert to new construction scheme
Change-Id: I2e785a9d62a3bd39d9e613776cfc8e35dd9ff5d4
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -187,6 +187,8 @@ void CppEditorWidget::finalizeInitialization()
|
|||||||
d->m_lastSemanticInfo.localUses = localUses;
|
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] {
|
connect(&d->m_localRenaming, &CppLocalRenaming::finished, [this] {
|
||||||
cppEditorDocument()->semanticRehighlight();
|
cppEditorDocument()->semanticRehighlight();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -68,8 +68,6 @@ CppLocalRenaming::CppLocalRenaming(TextEditor::BaseTextEditorWidget *editorWidge
|
|||||||
, m_firstRenameChangeExpected(false)
|
, m_firstRenameChangeExpected(false)
|
||||||
{
|
{
|
||||||
forgetRenamingSelection();
|
forgetRenamingSelection();
|
||||||
connect(m_editorWidget->document(), SIGNAL(contentsChange(int,int,int)),
|
|
||||||
this, SLOT(onContentsChangeOfEditorWidgetDocument(int,int,int)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppLocalRenaming::updateSelectionsForVariableUnderCursor(
|
void CppLocalRenaming::updateSelectionsForVariableUnderCursor(
|
||||||
|
|||||||
Reference in New Issue
Block a user