CppTools: Rework handling of ProjectInfo changes

(a) The code model manager figures out by itself which files were added
    or removed from the project.

    If this was done successfully, check also the timestamp of the
    common files and reindex if necessary.

(b) A full reindexing is only triggered if the project configuration
    changes (defines, includes, framework paths).

(c) If project files were removed, the garbage collector is called.

Task-number: QTCREATORBUG-9730
Change-Id: Ib855614b070880576233a3525813617c967a72f3
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Nikolai Kosjar
2013-07-10 14:46:08 +02:00
parent 74a94e656e
commit 8ea14767af
8 changed files with 418 additions and 33 deletions

View File

@@ -249,6 +249,9 @@ public:
virtual CppTools::CppIndexingSupport *indexingSupport() = 0;
signals:
/// Project data might be locked while this is emitted.
void aboutToRemoveFiles(const QStringList &files);
void documentUpdated(CPlusPlus::Document::Ptr doc);
void sourceFilesRefreshed(const QStringList &files);
@@ -258,9 +261,11 @@ signals:
void projectPartsUpdated(ProjectExplorer::Project *project);
public slots:
virtual void updateModifiedSourceFiles() = 0;
// Documented in source file.
virtual QFuture<void> updateSourceFiles(const QStringList &sourceFiles,
ProgressNotificationMode mode = ReservedProgressNotification) = 0;
virtual void updateModifiedSourceFiles() = 0;
virtual void GC() = 0;
};