From 2be6973daf00e60023c2bad4daab4ac20c361eec Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Mon, 8 Dec 2014 17:18:32 +0100 Subject: [PATCH] CppEditor: Updating local uses before matching quick fixes This is necessary since invoking the context menu changes the cursor position, on which the local uses and some refactoring actions depend. Change-Id: I32563085bfb106f754992704e569915b9ee5b127 Task-number: QTCREATORBUG-13388 Reviewed-by: Joerg Bornemann Reviewed-by: Erik Verbruggen Reviewed-by: Eike Ziller --- src/plugins/cppeditor/cppeditor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index dbd5be7ff89..65c834bacad 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -496,7 +496,8 @@ void CppEditorWidget::contextMenuEvent(QContextMenuEvent *e) QSignalMapper mapper; connect(&mapper, SIGNAL(mapped(int)), this, SLOT(performQuickFix(int))); - if (isSemanticInfoValid()) { + if (isSemanticInfoValidExceptLocalUses()) { + d->m_useSelectionsUpdater.update(CppUseSelectionsUpdater::Synchronous); AssistInterface *interface = createAssistInterface(QuickFix, ExplicitlyInvoked); if (interface) { QScopedPointer processor(