forked from qt-creator/qt-creator
CppEditor: Fix race condition for highlighting of local usages
Starting a renaming action involves looking up local usages. In this case, a different code path than normal updates the editor's extra selections, in order to make sure that the occurrence to be edited is rendered in a special way. We must therefore prevent the normal handler from taking action, as it would overwrite abovementioned special selection. Change-Id: Ia811b49b3023a0a366a43a69cc01e6b2b370acb5 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -805,6 +805,11 @@ bool CppEditorWidget::isSemanticInfoValid() const
|
||||
return isSemanticInfoValidExceptLocalUses() && d->m_lastSemanticInfo.localUsesUpdated;
|
||||
}
|
||||
|
||||
bool CppEditorWidget::isRenaming() const
|
||||
{
|
||||
return d->m_localRenaming.isActive();
|
||||
}
|
||||
|
||||
SemanticInfo CppEditorWidget::semanticInfo() const
|
||||
{
|
||||
return d->m_lastSemanticInfo;
|
||||
|
||||
Reference in New Issue
Block a user