forked from qt-creator/qt-creator
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:
@@ -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();
|
||||||
});
|
});
|
||||||
|
@@ -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();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user