CppEditor: Remove invalid QTC_ASSERT

This can be triggered by:
  1. Put the cursor on some identifier
  2. Type some e.g. a-z character and trigger Ctrl+Shift+R as fast as
     possible

Typing the characters modifies the document and triggers the
CppUseSelectionsUpdater asynchronously. The result comes in when we are
already in local renaming mode, thus the assert triggers.

Change-Id: I4ae7b2b4c259b3b1ef637f5272b0bda06b6db2ec
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Nikolai Kosjar
2017-07-20 16:35:55 +02:00
parent 846a92f387
commit a82c47d307

View File

@@ -70,7 +70,9 @@ CppLocalRenaming::CppLocalRenaming(TextEditor::TextEditorWidget *editorWidget)
void CppLocalRenaming::updateSelectionsForVariableUnderCursor(
const QList<QTextEdit::ExtraSelection> &selections)
{
QTC_ASSERT(!isActive(), return);
if (isActive())
return;
m_selections = selections;
}