From b182606193f30ecfb587fc9d69bae83ef304e2b7 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Mon, 14 Nov 2011 13:22:44 +0100 Subject: [PATCH] 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 --- src/plugins/cppeditor/cppeditor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index 088b6d12414..5af734e6330 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -633,6 +633,8 @@ void CPPEditorWidget::abortRename() m_currentRenameSelectionBegin = QTextCursor(); m_currentRenameSelectionEnd = QTextCursor(); setExtraSelections(CodeSemanticsSelection, m_renameSelections); + + rehighlight(); } void CPPEditorWidget::rehighlight(bool force) @@ -2131,7 +2133,7 @@ TextEditor::IAssistInterface *CPPEditorWidget::createAssistInterface( includePaths, frameworkPaths); } else if (kind == TextEditor::QuickFix) { - if (!semanticInfo().doc || semanticInfo().revision != editorRevision()) + if (!semanticInfo().doc || isOutdated()) return 0; return new CppQuickFixAssistInterface(const_cast(this), reason); }