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 <joerg.bornemann@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2014-12-08 17:18:32 +01:00
parent c64a3891a2
commit 2be6973daf

View File

@@ -496,7 +496,8 @@ void CppEditorWidget::contextMenuEvent(QContextMenuEvent *e)
QSignalMapper mapper; QSignalMapper mapper;
connect(&mapper, SIGNAL(mapped(int)), this, SLOT(performQuickFix(int))); connect(&mapper, SIGNAL(mapped(int)), this, SLOT(performQuickFix(int)));
if (isSemanticInfoValid()) { if (isSemanticInfoValidExceptLocalUses()) {
d->m_useSelectionsUpdater.update(CppUseSelectionsUpdater::Synchronous);
AssistInterface *interface = createAssistInterface(QuickFix, ExplicitlyInvoked); AssistInterface *interface = createAssistInterface(QuickFix, ExplicitlyInvoked);
if (interface) { if (interface) {
QScopedPointer<IAssistProcessor> processor( QScopedPointer<IAssistProcessor> processor(