forked from qt-creator/qt-creator
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: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -526,7 +526,8 @@ SemanticInfo CppEditorSupport::recalculateSemanticInfoNow(const SemanticInfo::So
|
|||||||
const QSharedPointer<SnapshotUpdater> snapshotUpdater = snapshotUpdater_internal();
|
const QSharedPointer<SnapshotUpdater> snapshotUpdater = snapshotUpdater_internal();
|
||||||
QTC_ASSERT(snapshotUpdater, return newSemanticInfo);
|
QTC_ASSERT(snapshotUpdater, return newSemanticInfo);
|
||||||
newSemanticInfo.snapshot = snapshotUpdater->snapshot();
|
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,
|
Document::Ptr doc = newSemanticInfo.snapshot.preprocessedDocument(source.code,
|
||||||
source.fileName);
|
source.fileName);
|
||||||
if (processor)
|
if (processor)
|
||||||
|
|||||||
Reference in New Issue
Block a user