diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-11-09 15:57:56 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-11-09 15:57:56 +0100 |
commit | 7aa24116935249a840e1350a6f8de73bc794fb09 (patch) | |
tree | f0d69542e8cb13187eaeebb43ec187b3ad763aa1 /src/plugins/cpptools/cpptoolsplugin.cpp | |
parent | 19fb0311bade0ffee612d51d64d40b04a811b7c4 (diff) | |
download | qt-creator-7aa24116935249a840e1350a6f8de73bc794fb09.tar.gz |
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 <roberto.raggi@nokia.com>
Reviewed-by: con <qtc-committer@nokia.com>
Diffstat (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp')
-rw-r--r-- | src/plugins/cpptools/cpptoolsplugin.cpp | 6 |
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); |