Commit 170389cf authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppTools: Remove a QTC_ASSERT

Triggering the action "Rename Symbol Under Cursor" before the
SnapshotUpdater::update() call in parse() of cpptoolseditorsupport.cpp
led to the failing assertion.

Triggering the action in the initialization phase of the editor is not
supported, therefore replace the assert with a silent if.

Change-Id: Ib911b8aa038ae3d9ea28c720853780b11dfa0fb7
Reviewed-by: default avatarErik Verbruggen <>
parent b70377c8
......@@ -526,7 +526,8 @@ SemanticInfo CppEditorSupport::recalculateSemanticInfoNow(const SemanticInfo::So
const QSharedPointer<SnapshotUpdater> snapshotUpdater = snapshotUpdater_internal();
QTC_ASSERT(snapshotUpdater, return newSemanticInfo);
newSemanticInfo.snapshot = snapshotUpdater->snapshot();
QTC_ASSERT(newSemanticInfo.snapshot.contains(source.fileName), return newSemanticInfo);
if (!newSemanticInfo.snapshot.contains(source.fileName))
return newSemanticInfo; // SnapshotUpdater::update() not yet started.
Document::Ptr doc = newSemanticInfo.snapshot.preprocessedDocument(source.code,
if (processor)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment