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:
@@ -142,6 +142,7 @@ GitPlugin::GitPlugin() :
|
||||
m_stashListAction(0),
|
||||
m_branchListAction(0),
|
||||
m_gitClient(0),
|
||||
m_versionControl(0),
|
||||
m_changeSelectionDialog(0),
|
||||
m_submitActionTriggered(false)
|
||||
{
|
||||
@@ -215,8 +216,8 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
|
||||
addAutoReleasedObject(new GitSubmitEditorFactory(&submitParameters));
|
||||
|
||||
GitVersionControl *versionControl = new GitVersionControl(m_gitClient);
|
||||
addAutoReleasedObject(versionControl);
|
||||
m_versionControl = new GitVersionControl(m_gitClient);
|
||||
addAutoReleasedObject(m_versionControl);
|
||||
|
||||
addAutoReleasedObject(new CloneWizard);
|
||||
addAutoReleasedObject(new Gitorious::Internal::GitoriousCloneWizard);
|
||||
@@ -232,8 +233,8 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
gitContainer->menu()->setTitle(tr("&Git"));
|
||||
toolsContainer->addMenu(gitContainer);
|
||||
if (QAction *ma = gitContainer->menu()->menuAction()) {
|
||||
ma->setEnabled(versionControl->isEnabled());
|
||||
connect(versionControl, SIGNAL(enabledChanged(bool)), ma, SLOT(setVisible(bool)));
|
||||
ma->setEnabled(m_versionControl->isEnabled());
|
||||
connect(m_versionControl, SIGNAL(enabledChanged(bool)), ma, SLOT(setVisible(bool)));
|
||||
}
|
||||
|
||||
Core::Command *command;
|
||||
@@ -398,6 +399,11 @@ void GitPlugin::extensionsInitialized()
|
||||
{
|
||||
}
|
||||
|
||||
GitVersionControl *GitPlugin::versionControl() const
|
||||
{
|
||||
return m_versionControl;
|
||||
}
|
||||
|
||||
void GitPlugin::submitEditorDiff(const QStringList &unstaged, const QStringList &staged)
|
||||
{
|
||||
m_gitClient->diff(m_submitRepository, QStringList(), unstaged, staged);
|
||||
|
Reference in New Issue
Block a user