C++ editor: Reparse after applying rename.

Fixes using quick fixes directly after finishing a rename.

Task-number: QTCREATORBUG-6412

Change-Id: I22ee1df5f64189e87f6a3b3ae41781ed4b24afb4
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
Christian Kamm
2011-11-14 13:22:44 +01:00
parent 3df6b712e4
commit b182606193

View File

@@ -633,6 +633,8 @@ void CPPEditorWidget::abortRename()
m_currentRenameSelectionBegin = QTextCursor(); m_currentRenameSelectionBegin = QTextCursor();
m_currentRenameSelectionEnd = QTextCursor(); m_currentRenameSelectionEnd = QTextCursor();
setExtraSelections(CodeSemanticsSelection, m_renameSelections); setExtraSelections(CodeSemanticsSelection, m_renameSelections);
rehighlight();
} }
void CPPEditorWidget::rehighlight(bool force) void CPPEditorWidget::rehighlight(bool force)
@@ -2131,7 +2133,7 @@ TextEditor::IAssistInterface *CPPEditorWidget::createAssistInterface(
includePaths, includePaths,
frameworkPaths); frameworkPaths);
} else if (kind == TextEditor::QuickFix) { } else if (kind == TextEditor::QuickFix) {
if (!semanticInfo().doc || semanticInfo().revision != editorRevision()) if (!semanticInfo().doc || isOutdated())
return 0; return 0;
return new CppQuickFixAssistInterface(const_cast<CPPEditorWidget *>(this), reason); return new CppQuickFixAssistInterface(const_cast<CPPEditorWidget *>(this), reason);
} }