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:
@@ -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