From 7aa24116935249a840e1350a6f8de73bc794fb09 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 9 Nov 2009 15:57:56 +0100 Subject: Code model: Update on changes from the versioning system. Add state logic to CppCodeModelManagerInterface, making it aware whether an indexer is running, protect the update methods from another invocation while running. Add changed signals to IVersionControl and VCSManager and wire them to the update methods. Add a menu action for manually updating. Reviewed-by: Roberto Raggi Reviewed-by: con --- 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