diff options
author | Andre Hartmann <aha_1980@gmx.de> | 2013-04-25 13:04:45 +0200 |
---|---|---|
committer | André Hartmann <aha_1980@gmx.de> | 2013-09-30 19:20:11 +0200 |
commit | 9654df9f1f92ab2c1548c10ca614a6ab82783ac4 (patch) | |
tree | 108ea87e710651322fc7bcdd86555f8b16ba7403 /src/plugins/git/gerrit/gerritplugin.cpp | |
parent | 02825b589443836eff985e61a03af8be28a2f17d (diff) | |
download | qt-creator-9654df9f1f92ab2c1548c10ca614a6ab82783ac4.tar.gz |
Git: Allow direct push after commit
Git commit dialog: Added a drop-down menu to the commit button to
execute "git push" or open the "Push to Gerrit" dialog directly after
a commit or amend.
Task-number: QTCREATORBUG-8854
Change-Id: I00ff8f816d1768e0cdaf6929126b55826788e578
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/git/gerrit/gerritplugin.cpp')
-rw-r--r-- | src/plugins/git/gerrit/gerritplugin.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/git/gerrit/gerritplugin.cpp b/src/plugins/git/gerrit/gerritplugin.cpp index df424fb368..75eefd32b1 100644 --- a/src/plugins/git/gerrit/gerritplugin.cpp +++ b/src/plugins/git/gerrit/gerritplugin.cpp @@ -308,10 +308,8 @@ void GerritPlugin::addToLocator(Locator::CommandLocator *locator) locator->appendCommand(m_pushToGerritPair.second); } -void GerritPlugin::push() +void GerritPlugin::push(const QString &topLevel) { - const QString topLevel = Git::Internal::GitPlugin::instance()->currentState().topLevel(); - // QScopedPointer is required to delete the dialog when leaving the function GerritPushDialog dialog(topLevel, m_reviewers, ICore::mainWindow()); @@ -387,6 +385,11 @@ void GerritPlugin::openView() m_dialog.data()->raise(); } +void GerritPlugin::push() +{ + push(Git::Internal::GitPlugin::instance()->currentState().topLevel()); +} + QString GerritPlugin::gitBinary() { bool ok; |