summaryrefslogtreecommitdiff
path: root/src/plugins/git/gerrit
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2015-02-12 15:23:16 +0200
committerOrgad Shaneh <orgads@gmail.com>2015-02-16 15:29:39 +0000
commita260afe004b340563846d77a39222fd85a2e217f (patch)
treec48660106b88dbaead3c3c7fc7412e0091d10925 /src/plugins/git/gerrit
parent747118740400ec7aaa3fc4bddf162115232d25bc (diff)
downloadqt-creator-a260afe004b340563846d77a39222fd85a2e217f.tar.gz
Gerrit: Place gerrit and origin remotes first
Change-Id: Icf74210934b92c3f794ccc764b8e526d51eafc2b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/plugins/git/gerrit')
-rw-r--r--src/plugins/git/gerrit/gerritpushdialog.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/git/gerrit/gerritpushdialog.cpp b/src/plugins/git/gerrit/gerritpushdialog.cpp
index a8986774d1..b088367ded 100644
--- a/src/plugins/git/gerrit/gerritpushdialog.cpp
+++ b/src/plugins/git/gerrit/gerritpushdialog.cpp
@@ -119,6 +119,15 @@ void GerritPushDialog::initRemoteBranches()
m_remoteBranches.insertMulti(ref.left(refBranchIndex), bd);
}
QStringList remotes = m_client->synchronousRemotesList(m_workingDir).keys();
+ remotes.removeDuplicates();
+ {
+ const QString origin = QLatin1String("origin");
+ const QString gerrit = QLatin1String("gerrit");
+ if (remotes.removeOne(origin))
+ remotes.prepend(origin);
+ if (remotes.removeOne(gerrit))
+ remotes.prepend(gerrit);
+ }
m_ui->remoteComboBox->addItems(remotes);
m_ui->remoteComboBox->setEnabled(remotes.count() > 1);
}