forked from qt-creator/qt-creator
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:
committed by
Tobias Hunger
parent
ef65ce480d
commit
45b4ff4e74
@@ -372,6 +372,9 @@ void GerritPlugin::openView()
|
||||
this, SLOT(fetchApply(QSharedPointer<Gerrit::Internal::GerritChange>)));
|
||||
connect(gd, SIGNAL(fetchCheckout(QSharedPointer<Gerrit::Internal::GerritChange>)),
|
||||
this, SLOT(fetchCheckout(QSharedPointer<Gerrit::Internal::GerritChange>)));
|
||||
connect(this, SIGNAL(fetchStarted(QSharedPointer<Gerrit::Internal::GerritChange>)),
|
||||
gd, SLOT(fetchStarted(QSharedPointer<Gerrit::Internal::GerritChange>)));
|
||||
connect(this, SIGNAL(fetchFinished()), gd, SLOT(fetchFinished()));
|
||||
m_dialog = gd;
|
||||
}
|
||||
const Qt::WindowStates state = m_dialog.data()->windowState();
|
||||
@@ -442,6 +445,8 @@ void GerritPlugin::fetch(const QSharedPointer<Gerrit::Internal::GerritChange> &c
|
||||
|
||||
FetchContext *fc = new FetchContext(change, repository, git,
|
||||
m_parameters, FetchMode(mode), this);
|
||||
connect(fc, SIGNAL(destroyed(QObject*)), this, SIGNAL(fetchFinished()));
|
||||
emit fetchStarted(change);
|
||||
fc->start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user