Gerrit: Force remote refreshing on 401 error

Can happen if the password was changed.

Change-Id: If0f0fa047c376c193ceda50e5465d016e16b61a3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2017-03-13 17:50:28 +02:00
committed by Orgad Shaneh
parent 75273506c1
commit 11e8ce65db
3 changed files with 13 additions and 1 deletions

View File

@@ -124,6 +124,11 @@ GerritDialog::GerritDialog(const QSharedPointer<GerritParameters> &p,
m_refreshButton, &QWidget::setDisabled);
connect(m_model, &GerritModel::refreshStateChanged,
this, &GerritDialog::slotRefreshStateChanged);
connect(m_model, &GerritModel::errorText,
this, [this](const QString &text) {
if (text.contains("returned error: 401"))
updateRemotes(true);
}, Qt::QueuedConnection);
setCurrentPath(repository);
slotCurrentChanged();