Gerrit: Disable buttons while fetch operation is in progress.

Gerrit operations should not be started in parallel since
they use FETCH_HEAD, which can cause mix-ups.

Change-Id: Icb421c8065f680a4bb93acd63e1ffe6309ce774a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Friedemann Kleint
2012-12-07 15:31:00 +01:00
committed by Tobias Hunger
parent ef65ce480d
commit 45b4ff4e74
4 changed files with 45 additions and 3 deletions

View File

@@ -84,6 +84,10 @@ signals:
void fetchApply(const QSharedPointer<Gerrit::Internal::GerritChange> &);
void fetchCheckout(const QSharedPointer<Gerrit::Internal::GerritChange> &);
public slots:
void fetchStarted(const QSharedPointer<Gerrit::Internal::GerritChange> &change);
void fetchFinished();
private slots:
void slotCurrentChanged();
void slotDoubleClicked(const QModelIndex &);
@@ -98,6 +102,7 @@ private:
const QStandardItem *currentItem(int column = 0) const;
QPushButton *addActionButton(const QString &text, const char *buttonSlot);
void updateCompletions(const QString &query);
void updateButtons();
const QSharedPointer<GerritParameters> m_parameters;
QSortFilterProxyModel *m_filterModel;
@@ -112,6 +117,7 @@ private:
QPushButton *m_applyButton;
QPushButton *m_checkoutButton;
QPushButton *m_refreshButton;
bool m_fetchRunning;
};
} // namespace Internal