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 From e4b1a25dd2bb8233a02c7ae5a5476e88ac4f0451 Mon Sep 17 00:00:00 2001 From: con Date: Tue, 10 Nov 2009 18:02:42 +0100 Subject: Revert "Code model: Update on changes from the versioning system." This reverts commit 7aa24116935249a840e1350a6f8de73bc794fb09. It breaks the code model updates completely. So reverting this change until we have the right thing. Reviewed-by: Roberto Raggi --- src/plugins/cpptools/cpptoolsplugin.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp') diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp index d321b7c39b..bbc894390c 100644 --- a/src/plugins/cpptools/cpptoolsplugin.cpp +++ b/src/plugins/cpptools/cpptoolsplugin.cpp @@ -47,7 +47,6 @@ #include #include #include -#include #include #include @@ -98,11 +97,6 @@ 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 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