summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppmodelmanagerinterface.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2013-07-10 14:46:08 +0200
committerNikolai Kosjar <nikolai.kosjar@digia.com>2013-08-13 14:13:33 +0200
commit8ea14767af70f7c0c2e9940f018e7b17e6f00205 (patch)
tree469b7cc7f5af7c08350fffdc9724f31048665ec0 /src/plugins/cpptools/cppmodelmanagerinterface.cpp
parent74a94e656e8c4ee4176ef369919f1a786a07040f (diff)
downloadqt-creator-8ea14767af70f7c0c2e9940f018e7b17e6f00205.tar.gz
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>
Diffstat (limited to 'src/plugins/cpptools/cppmodelmanagerinterface.cpp')
-rw-r--r--src/plugins/cpptools/cppmodelmanagerinterface.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppmodelmanagerinterface.cpp b/src/plugins/cpptools/cppmodelmanagerinterface.cpp
index 1338c214a1..cb5ba96e6d 100644
--- a/src/plugins/cpptools/cppmodelmanagerinterface.cpp
+++ b/src/plugins/cpptools/cppmodelmanagerinterface.cpp
@@ -68,6 +68,37 @@ using namespace ProjectExplorer;
Parser may enable tricks for Qt v5.x
*/
+/*!
+ \fn virtual QFuture<void> updateProjectInfo(const ProjectInfo &pinfo) = 0;
+ \param pinfo Updated ProjectInfo.
+ \return A future that reports progress and allows to cancel the reparsing operation.
+
+ This function is expected to be called by the project managers to update the
+ code model with new project information.
+
+ In particular, the function should be called in case:
+ 1. A new project is opened/created
+ 2. The project configuration changed. This includes
+ 2.1 Changes of defines, includes, framework paths
+ 2.2 Addition/Removal of project files
+
+ \sa CppTools::CppModelManagerInterface::updateSourceFiles()
+*/
+
+/*!
+ \fn virtual QFuture<void> updateSourceFiles(const QStringList &sourceFiles, ProgressNotificationMode mode = ReservedProgressNotification) = 0;
+ \param sourceFiles List of source file to update. The items are absolute paths.
+ \param mode The progress modification mode.
+ \return A future that reports progress and allows to cancel the reparsing operation.
+
+ Trigger an asynchronous reparsing of the given source files.
+
+ This function is not meant to be called by the project managers.
+
+ \sa CppTools::CppModelManagerInterface::ProgressNotificationMode
+ \sa CppTools::CppModelManagerInterface::updateProjectInfo()
+*/
+
ProjectPart::ProjectPart()
: cVersion(C89)
, cxxVersion(CXX11)