summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolsplugin.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-11-11 14:32:54 +0100
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-11-11 14:32:54 +0100
commit8335a06ed4e1918c7216d82dc7a97bbea2b774aa (patch)
treef4d2d35b0ae9fdb06fce8d955bb33f38c0a58925 /src/plugins/cpptools/cpptoolsplugin.cpp
parent4d45ad00037a056e52c74dca8a5c00ab2763da5d (diff)
downloadqt-creator-8335a06ed4e1918c7216d82dc7a97bbea2b774aa.tar.gz
Code model: Update on changes from the versioning system.
Add changed signals to IVersionControl and VCSManager and wire them to the update methods. Add a menu action for manually updating. Improved version of reverted 7aa24116935249a840e1350a6f8de73bc794fb09. Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp')
-rw-r--r--src/plugins/cpptools/cpptoolsplugin.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp
index bbc894390c..d321b7c39b 100644
--- a/src/plugins/cpptools/cpptoolsplugin.cpp
+++ b/src/plugins/cpptools/cpptoolsplugin.cpp
@@ -47,6 +47,7 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/progressmanager/progressmanager.h>
+#include <coreplugin/vcsmanager.h>
#include <cppeditor/cppeditorconstants.h>
#include <QtCore/QtConcurrentRun>
@@ -97,6 +98,11 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
// Objects
m_modelManager = new CppModelManager(this);
+ Core::VCSManager *vcsManager = core->vcsManager();
+ connect(vcsManager, SIGNAL(repositoryChanged(QString)),
+ m_modelManager, SLOT(updateModifiedSourceFiles()));
+ connect(vcsManager, SIGNAL(filesChanged(QStringList)),
+ m_modelManager, SLOT(updateModifiedSourceFiles()));
addAutoReleasedObject(m_modelManager);
m_completion = new CppCodeCompletion(m_modelManager);