From 8335a06ed4e1918c7216d82dc7a97bbea2b774aa Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 11 Nov 2009 14:32:54 +0100 Subject: 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 --- src/plugins/cpptools/cpptoolsplugin.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp') 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 #include #include +#include #include #include @@ -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); -- cgit v1.2.1