Git: Fix crash on Commit + Push to Gerrit

Task-number: QTCREATORBUG-17634
Change-Id: I60d8067fe9cfc23acb688e06506363bca67ec0a5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2017-01-30 09:12:47 +02:00
committed by Orgad Shaneh
parent b805639776
commit 2def95374d

View File

@@ -1051,10 +1051,12 @@ bool GitPlugin::submitEditorAboutToClose()
m_gitClient->interactiveRebase(m_submitRepository, amendSHA1, true); m_gitClient->interactiveRebase(m_submitRepository, amendSHA1, true);
} else { } else {
m_gitClient->continueCommandIfNeeded(m_submitRepository); m_gitClient->continueCommandIfNeeded(m_submitRepository);
if (editor->panelData().pushAction == NormalPush) if (editor->panelData().pushAction == NormalPush) {
m_gitClient->push(m_submitRepository); m_gitClient->push(m_submitRepository);
else if (editor->panelData().pushAction == PushToGerrit) } else if (editor->panelData().pushAction == PushToGerrit) {
connect(editor, &QObject::destroyed, this, &GitPlugin::delayedPushToGerrit); connect(editor, &QObject::destroyed, this, &GitPlugin::delayedPushToGerrit,
Qt::QueuedConnection);
}
} }
return true; return true;