CppTools: Fix incompletely indexed project

Use case to reproduce:
 1. Open some bigger project, e.g. qtcreator.pro
 2. As soon as "Parsing C/C++ files" is reported, add a character to
    qmake's additional arguments in project mode (indexing should not be
    finished at this point).
 3. The indexing gets canceled.
 ==> ...but reindexing is not triggered.

Fix by checking whether the future was canceled.

Task-number: QTCREATORBUG-16134
Change-Id: I520c6a64a6adc1cb04cafb5e0aa56c8bf41d7b14
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Nikolai Kosjar
2016-04-25 13:17:20 +02:00
parent e8b538985d
commit 536ccc8a87
2 changed files with 31 additions and 3 deletions

View File

@@ -206,6 +206,7 @@ private:
void initializeBuiltinModelManagerSupport();
void delayedGC();
void recalculateProjectPartMappings();
void watchForCanceledProjectIndexer(QFuture<void> future, ProjectExplorer::Project *project);
void replaceSnapshot(const CPlusPlus::Snapshot &newSnapshot);
void removeFilesFromSnapshot(const QSet<QString> &removedFiles);