diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 90498282351..8d664496a4a 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -1051,10 +1051,12 @@ bool GitPlugin::submitEditorAboutToClose() m_gitClient->interactiveRebase(m_submitRepository, amendSHA1, true); } else { m_gitClient->continueCommandIfNeeded(m_submitRepository); - if (editor->panelData().pushAction == NormalPush) + if (editor->panelData().pushAction == NormalPush) { m_gitClient->push(m_submitRepository); - else if (editor->panelData().pushAction == PushToGerrit) - connect(editor, &QObject::destroyed, this, &GitPlugin::delayedPushToGerrit); + } else if (editor->panelData().pushAction == PushToGerrit) { + connect(editor, &QObject::destroyed, this, &GitPlugin::delayedPushToGerrit, + Qt::QueuedConnection); + } } return true;