{Cpp,Text}Editor: Fix duplicating CppEditorWidget

Fixes local use highlighting and renaming in new split, among others.

Done-with: hjk <hjk121@nokiamail.com>
Change-Id: Ic604d37d2dc0082fa4a75c2af457f60d6d6cfa66
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Nikolai Kosjar
2014-08-28 18:37:50 +02:00
parent b5ecaff32c
commit 9e3441df8b
4 changed files with 19 additions and 8 deletions

View File

@@ -227,12 +227,19 @@ void CppEditorWidget::finalizeInitialization()
connect(d->m_preprocessorButton, SIGNAL(clicked()), this, SLOT(showPreProcessorWidget()));
insertExtraToolBarWidget(TextEditor::BaseTextEditorWidget::Left, d->m_preprocessorButton);
insertExtraToolBarWidget(TextEditor::BaseTextEditorWidget::Left, d->m_cppEditorOutline->widget());
}
// updateSemanticInfo(semanticInfo());
// updateFunctionDeclDefLink();
// d->m_cppEditorOutline->update();
// const ExtraSelectionKind selectionKind = CodeWarningsSelection;
// setExtraSelections(selectionKind, extraSelections(selectionKind));
void CppEditorWidget::finalizeInitializationAfterDuplication(BaseTextEditorWidget *other)
{
QTC_ASSERT(other, return);
CppEditorWidget *cppEditorWidget = qobject_cast<CppEditorWidget *>(other);
QTC_ASSERT(cppEditorWidget, return);
if (cppEditorWidget->isSemanticInfoValidExceptLocalUses())
updateSemanticInfo(cppEditorWidget->semanticInfo());
d->m_cppEditorOutline->update();
const ExtraSelectionKind selectionKind = CodeWarningsSelection;
setExtraSelections(selectionKind, cppEditorWidget->extraSelections(selectionKind));
}
CppEditorWidget::~CppEditorWidget()