summaryrefslogtreecommitdiff
path: root/src/plugins/git/branchdialog.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2013-07-08 15:01:17 +0200
committerEike Ziller <eike.ziller@digia.com>2013-07-08 15:01:17 +0200
commita98fe15fe51a87e2943623caf2a8ea072cfc5919 (patch)
treecd591ee60c464a385c02a92bcaba34ccdeadcd2e /src/plugins/git/branchdialog.cpp
parent2c211007257f5e58e2809692b74bb5b18f63b80c (diff)
parent07c0a8348c59945465e9f2330a40f625543f7f8a (diff)
downloadqt-creator-a98fe15fe51a87e2943623caf2a8ea072cfc5919.tar.gz
Merge remote-tracking branch 'origin/2.8' into HEAD
Conflicts: qbs/pluginspec/pluginspec.qbs Change-Id: Ic8e992623b9eda8913ee473c779a8df27643ccc9
Diffstat (limited to 'src/plugins/git/branchdialog.cpp')
-rw-r--r--src/plugins/git/branchdialog.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/git/branchdialog.cpp b/src/plugins/git/branchdialog.cpp
index 1f9ce03bdb..9b97eae4fb 100644
--- a/src/plugins/git/branchdialog.cpp
+++ b/src/plugins/git/branchdialog.cpp
@@ -97,6 +97,12 @@ void BranchDialog::refresh(const QString &repository, bool force)
m_ui->branchView->expandAll();
}
+void BranchDialog::refreshIfSame(const QString &repository)
+{
+ if (m_repository == repository)
+ refresh();
+}
+
void BranchDialog::enableButtons()
{
QModelIndex idx = selectedIndex();
@@ -306,8 +312,7 @@ void BranchDialog::log()
void BranchDialog::merge()
{
QModelIndex idx = selectedIndex();
- QTC_CHECK(m_model->isLocal(m_model->currentBranch())); // otherwise the button would not be enabled!
- QTC_CHECK(idx != m_model->currentBranch()); // otherwise the button would not be enabled!
+ QTC_CHECK(idx != m_model->currentBranch()); // otherwise the button would not be enabled!
const QString branch = m_model->fullName(idx, true);
GitClient *client = GitPlugin::instance()->gitClient();
@@ -318,8 +323,7 @@ void BranchDialog::merge()
void BranchDialog::rebase()
{
QModelIndex idx = selectedIndex();
- QTC_CHECK(m_model->isLocal(m_model->currentBranch())); // otherwise the button would not be enabled!
- QTC_CHECK(idx != m_model->currentBranch()); // otherwise the button would not be enabled!
+ QTC_CHECK(idx != m_model->currentBranch()); // otherwise the button would not be enabled!
const QString baseBranch = m_model->fullName(idx, true);
GitClient *client = GitPlugin::instance()->gitClient();