forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
7471187404
commit
a260afe004
@@ -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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user