diff options
author | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-07-07 16:34:34 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-07-08 10:44:39 +0200 |
commit | 170389cf403d13cc0758b6bf8e6fc13d9b56a771 (patch) | |
tree | 589f7f5d00bea8cb59e5a832edd2e2b2df48b8e1 /src/plugins/cpptools/cpptoolseditorsupport.cpp | |
parent | b70377c872a14be8a53f41cd8b96df1b88edd5bd (diff) | |
download | qt-creator-170389cf403d13cc0758b6bf8e6fc13d9b56a771.tar.gz |
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>
Diffstat (limited to 'src/plugins/cpptools/cpptoolseditorsupport.cpp')
-rw-r--r-- | src/plugins/cpptools/cpptoolseditorsupport.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 = 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) |