Commit f3f5a16f authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Gerrit: Fix initial refresh

when the fallback host matches the remote.

Change-Id: I2c630739db4b698acdcf51f6b663070cfd5ecc4d
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent da3f9379
......@@ -218,8 +218,10 @@ void GerritDialog::remoteChanged()
if (m_updatingRemotes || m_ui->remoteComboBox->count() == 0)
return;
const GerritServer server = m_ui->remoteComboBox->currentData().value<GerritServer>();
if (m_server->host == server.host)
return;
if (QSharedPointer<GerritServer> modelServer = m_model->server()) {
if (*modelServer == server)
return;
}
*m_server = server;
slotRefresh();
}
......
......@@ -118,6 +118,7 @@ public:
QString toHtml(const QModelIndex &index) const;
QStandardItem *itemForNumber(int number) const;
QSharedPointer<GerritServer> server() const { return m_server; }
enum QueryState { Idle, Running, Ok, Error };
QueryState state() const { return m_state; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment