forked from qt-creator/qt-creator
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
7aa2411693.
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user