Gerrit: Update remotes on settings change

If the user is changed, we need to refresh at least the fallback server.

Task-number: QTCREATORBUG-20536
Change-Id: If21830ae5607907db9aaee164bc85b971ff93010
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2018-05-31 22:16:46 +03:00
committed by Orgad Shaneh
parent 4a868d6a18
commit 909f30f006
5 changed files with 30 additions and 1 deletions

View File

@@ -292,7 +292,12 @@ bool GerritPlugin::initialize(ActionContainer *ac)
connect(pushAction, &QAction::triggered, this, [this]() { push(); });
ac->addAction(m_pushToGerritCommand);
new GerritOptionsPage(m_parameters, this);
auto options = new GerritOptionsPage(m_parameters, this);
connect(options, &GerritOptionsPage::settingsChanged,
this, [this] {
if (m_dialog)
m_dialog->scheduleUpdateRemotes();
});
return true;
}