From 170389cf403d13cc0758b6bf8e6fc13d9b56a771 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Mon, 7 Jul 2014 16:34:34 +0200 Subject: 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 --- src/plugins/cpptools/cpptoolseditorsupport.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/cpptools/cpptoolseditorsupport.cpp') diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp index eb496f9e3d..56f31d9218 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.cpp +++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp @@ -526,7 +526,8 @@ SemanticInfo CppEditorSupport::recalculateSemanticInfoNow(const SemanticInfo::So const QSharedPointer 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, source.fileName); if (processor) -- cgit v1.2.1