summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2010-03-17 14:18:32 +0100
committerErik Verbruggen <erik.verbruggen@nokia.com>2010-03-17 14:20:17 +0100
commit284b8d38e2cba9a6bbfa95dd01b2fdb6cda29574 (patch)
tree2cedc13d8ed211b4ca4ec48ecb63ac1b196ad504 /src/libs/cplusplus
parent1cc5e1fe01d83ead385ec14411e744b6cd145c85 (diff)
downloadqt-creator-284b8d38e2cba9a6bbfa95dd01b2fdb6cda29574.tar.gz
Put the DependencyTable calculation into the QFuture.
Done-with: Roberto Raggi
Diffstat (limited to 'src/libs/cplusplus')
-rw-r--r--src/libs/cplusplus/DependencyTable.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libs/cplusplus/DependencyTable.cpp b/src/libs/cplusplus/DependencyTable.cpp
index 20871e5b52..ebf4776c31 100644
--- a/src/libs/cplusplus/DependencyTable.cpp
+++ b/src/libs/cplusplus/DependencyTable.cpp
@@ -74,9 +74,7 @@ QHash<QString, QStringList> DependencyTable::dependencyTable() const
bool DependencyTable::isValidFor(const Snapshot &snapshot) const
{
const int documentCount = snapshot.size();
- if (documentCount != files.size()
- || documentCount != includesPerFile.size()
- || documentCount != includeMap.size())
+ if (documentCount != files.size())
return false;
for (Snapshot::const_iterator it = snapshot.begin(); it != snapshot.end(); ++it) {
@@ -93,6 +91,12 @@ bool DependencyTable::isValidFor(const Snapshot &snapshot) 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);