ClassView: Remove redundant call to clearCache() before resetParser()

clearCache() is already called from inside
Manager::resetParser() ->
Parser::resetDataToCurrentState() ->
Parser::resetData() ->
Parser::clearCache().

Change-Id: I270be85b291f99552959e50ee54bd6e1f293c63a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Jarek Kobus
2021-02-09 11:54:22 +01:00
parent c98e320082
commit 9d0b661551
2 changed files with 1 additions and 4 deletions

View File

@@ -190,9 +190,6 @@ void Manager::initialize()
if (!state()) if (!state())
return; return;
// any document might be changed, clear parser's cache
QMetaObject::invokeMethod(&d->parser, &Parser::clearCache, Qt::QueuedConnection);
// request to update a tree to the current state // request to update a tree to the current state
resetParser(); resetParser();
}); });

View File

@@ -600,7 +600,7 @@ void Parser::resetData(const CPlusPlus::Snapshot &snapshot)
CPlusPlus::Snapshot::const_iterator cur = snapshot.begin(); CPlusPlus::Snapshot::const_iterator cur = snapshot.begin();
CPlusPlus::Snapshot::const_iterator end = snapshot.end(); CPlusPlus::Snapshot::const_iterator end = snapshot.end();
for (; cur != end; ++cur) for (; cur != end; ++cur)
d->documentList[cur.key().toString()] = cur.value(); d->documentList[cur.key().toString()] = cur.value(); // why we don't clear documentList?
d->docLocker.unlock(); d->docLocker.unlock();