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>
This commit is contained in:
Orgad Shaneh
2015-02-12 15:23:16 +02:00
committed by Orgad Shaneh
parent 7471187404
commit a260afe004

View File

@@ -119,6 +119,15 @@ void GerritPushDialog::initRemoteBranches()
m_remoteBranches.insertMulti(ref.left(refBranchIndex), bd); m_remoteBranches.insertMulti(ref.left(refBranchIndex), bd);
} }
QStringList remotes = m_client->synchronousRemotesList(m_workingDir).keys(); 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->addItems(remotes);
m_ui->remoteComboBox->setEnabled(remotes.count() > 1); m_ui->remoteComboBox->setEnabled(remotes.count() > 1);
} }