forked from qt-creator/qt-creator
C++: Clear state in DependencyTable::build
...since build() is called multiple times for e.g. the global snapshot (CppModelManager::projectPartFromDependencies, CppModelManager::replaceDocument). Change-Id: I03667496a5abc984ba976046dc7b76998a6e3336 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -52,6 +52,12 @@ QStringList DependencyTable::filesDependingOn(const QString &fileName) const
|
||||
|
||||
void DependencyTable::build(const Snapshot &snapshot)
|
||||
{
|
||||
includesPerFile.clear();
|
||||
files.clear();
|
||||
fileIndex.clear();
|
||||
includes.clear();
|
||||
includeMap.clear();
|
||||
|
||||
const int documentCount = snapshot.size();
|
||||
files.resize(documentCount);
|
||||
includeMap.resize(documentCount);
|
||||
|
Reference in New Issue
Block a user