forked from qt-creator/qt-creator
Gerrit: Support REST query for HTTP servers
Change-Id: Icc164b9d84abe4efc34deaa5d19dca167fdb14e1 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
be204a125e
commit
f7a778690d
@@ -240,13 +240,9 @@ void GerritDialog::updateRemotes()
|
||||
while (mapIt.hasNext()) {
|
||||
mapIt.next();
|
||||
GerritServer server;
|
||||
if (!server.fillFromRemote(mapIt.value(), m_parameters->server.user.userName))
|
||||
if (!server.fillFromRemote(mapIt.value(), *m_parameters))
|
||||
continue;
|
||||
// Only Ssh is currently supported. In order to extend support for http[s],
|
||||
// we need to move this logic to the model, and attempt connection to each
|
||||
// remote (do it only on refresh, not on each path change)
|
||||
if (server.type == GerritServer::Ssh)
|
||||
addRemote(server, mapIt.key());
|
||||
addRemote(server, mapIt.key());
|
||||
}
|
||||
addRemote(m_parameters->server, tr("Fallback"));
|
||||
m_updatingRemotes = false;
|
||||
@@ -257,7 +253,7 @@ void GerritDialog::addRemote(const GerritServer &server, const QString &name)
|
||||
{
|
||||
for (int i = 0, total = m_ui->remoteComboBox->count(); i < total; ++i) {
|
||||
const GerritServer s = m_ui->remoteComboBox->itemData(i).value<GerritServer>();
|
||||
if (s.host == server.host)
|
||||
if (s == server)
|
||||
return;
|
||||
}
|
||||
m_ui->remoteComboBox->addItem(server.host + QString(" (%1)").arg(name),
|
||||
|
||||
Reference in New Issue
Block a user