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

Gerrit: Refresh when the dialog is re-opened

Task-number: QTCREATORBUG-10028
Change-Id: I60d91d88df5596f7d34605ed28d0cc6ef3427a8c
Reviewed-by: default avatarRobert Loehning <robert.loehning@qt.io>
parent 2bf14c76
......@@ -82,7 +82,7 @@ GerritDialog::GerritDialog(const QSharedPointer<GerritParameters> &p,
m_ui->filterLineEdit->setFiltering(true);
connect(m_ui->filterLineEdit, &Utils::FancyLineEdit::filterChanged,
m_filterModel, &QSortFilterProxyModel::setFilterFixedString);
connect(m_ui->queryLineEdit, &QLineEdit::returnPressed, this, &GerritDialog::slotRefresh);
connect(m_ui->queryLineEdit, &QLineEdit::returnPressed, this, &GerritDialog::refresh);
connect(m_model, &GerritModel::stateChanged, m_ui->queryLineEdit, &Utils::FancyLineEdit::validate);
connect(m_ui->remoteComboBox, &QComboBox::currentTextChanged,
this, &GerritDialog::remoteChanged);
......@@ -118,7 +118,7 @@ GerritDialog::GerritDialog(const QSharedPointer<GerritParameters> &p,
m_displayButton = addActionButton(tr("&Show"), [this]() { slotFetchDisplay(); });
m_cherryPickButton = addActionButton(tr("Cherry &Pick"), [this]() { slotFetchCherryPick(); });
m_checkoutButton = addActionButton(tr("C&heckout"), [this]() { slotFetchCheckout(); });
m_refreshButton = addActionButton(tr("&Refresh"), [this]() { slotRefresh(); });
m_refreshButton = addActionButton(tr("&Refresh"), [this]() { refresh(); });
connect(m_model, &GerritModel::refreshStateChanged,
m_refreshButton, &QWidget::setDisabled);
......@@ -214,7 +214,7 @@ void GerritDialog::slotFetchCheckout()
emit fetchCheckout(m_model->change(index));
}
void GerritDialog::slotRefresh()
void GerritDialog::refresh()
{
const QString &query = m_ui->queryLineEdit->text().trimmed();
updateCompletions(query);
......@@ -232,7 +232,7 @@ void GerritDialog::remoteChanged()
return;
}
*m_server = server;
slotRefresh();
refresh();
}
void GerritDialog::updateRemotes(bool forceReload)
......
......@@ -61,6 +61,7 @@ public:
void setCurrentPath(const QString &path);
void fetchStarted(const QSharedPointer<Gerrit::Internal::GerritChange> &change);
void fetchFinished();
void refresh();
signals:
void fetchDisplay(const QSharedPointer<Gerrit::Internal::GerritChange> &);
......@@ -74,7 +75,6 @@ private:
void slotFetchDisplay();
void slotFetchCherryPick();
void slotFetchCheckout();
void slotRefresh();
void remoteChanged();
void updateRemotes(bool forceReload = false);
void addRemote(const GerritServer &server, const QString &name);
......
......@@ -377,6 +377,7 @@ void GerritPlugin::openView()
m_dialog->setWindowState(state & ~Qt::WindowMinimized);
m_dialog->show();
m_dialog->raise();
m_dialog->refresh();
}
void GerritPlugin::push()
......
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