forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -57,7 +57,8 @@ struct VCSManagerPrivate {
|
||||
QMap<QString, IVersionControl *> m_cachedMatches;
|
||||
};
|
||||
|
||||
VCSManager::VCSManager() :
|
||||
VCSManager::VCSManager(QObject *parent) :
|
||||
QObject(parent),
|
||||
m_d(new VCSManagerPrivate)
|
||||
{
|
||||
}
|
||||
@@ -67,6 +68,17 @@ VCSManager::~VCSManager()
|
||||
delete m_d;
|
||||
}
|
||||
|
||||
void VCSManager::extensionsInitialized()
|
||||
{
|
||||
// Change signal connections
|
||||
foreach (IVersionControl *versionControl, allVersionControls()) {
|
||||
connect(versionControl, SIGNAL(filesChanged(QStringList)),
|
||||
this, SIGNAL(filesChanged(QStringList)));
|
||||
connect(versionControl, SIGNAL(repositoryChanged(QString)),
|
||||
this, SIGNAL(repositoryChanged(QString)));
|
||||
}
|
||||
}
|
||||
|
||||
void VCSManager::setVCSEnabled(const QString &directory)
|
||||
{
|
||||
if (debug)
|
||||
|
||||
Reference in New Issue
Block a user