Git: Update branches dialog when repository is changed

and on fetch

Task-number: QTCREATORBUG-9667
Change-Id: Id2e5080502bbc28d5f7900dd0433e468dda56c82
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Orgad Shaneh
2013-06-26 22:16:45 +03:00
committed by Orgad Shaneh
parent 0159774451
commit be5133cf72
6 changed files with 25 additions and 1 deletions

View File

@@ -689,6 +689,8 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(Core::ICore::vcsManager(), SIGNAL(repositoryChanged(QString)),
this, SLOT(updateContinueAndAbortCommands()));
connect(Core::ICore::vcsManager(), SIGNAL(repositoryChanged(QString)),
this, SLOT(updateBranches(QString)));
if (!Core::ICore::mimeDatabase()->addMimeTypes(QLatin1String(RC_GIT_MIME_XML), errorMessage))
return false;
@@ -1427,6 +1429,12 @@ void GitPlugin::updateContinueAndAbortCommands()
}
}
void GitPlugin::updateBranches(const QString &repository)
{
if (m_branchDialog && m_branchDialog->isVisible())
m_branchDialog->refreshIfSame(repository);
}
void GitPlugin::updateRepositoryBrowserAction()
{
const bool repositoryEnabled = currentState().hasTopLevel();