diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2012-12-07 15:31:00 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@digia.com> | 2012-12-11 15:19:35 +0100 |
commit | 45b4ff4e7464181c32e9b93092a995b77e40cb85 (patch) | |
tree | 6222c8ff0397aa183b0d3832791bcd9081ee2246 /src/plugins/git/gerrit/gerritplugin.cpp | |
parent | ef65ce480da2bbdb4d7f82812568e064614470a5 (diff) | |
download | qt-creator-45b4ff4e7464181c32e9b93092a995b77e40cb85.tar.gz |
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>
Diffstat (limited to 'src/plugins/git/gerrit/gerritplugin.cpp')
-rw-r--r-- | src/plugins/git/gerrit/gerritplugin.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/git/gerrit/gerritplugin.cpp b/src/plugins/git/gerrit/gerritplugin.cpp index bc35d31c8f..0fdac66320 100644 --- a/src/plugins/git/gerrit/gerritplugin.cpp +++ b/src/plugins/git/gerrit/gerritplugin.cpp @@ -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(); } |