From 6cf030d8d3fe0b53dac66175faa5c508f75d9ad0 Mon Sep 17 00:00:00 2001 From: Petar Perisin <petar.perisin@gmail.com> Date: Wed, 2 Oct 2013 09:40:08 +0300 Subject: [PATCH] Git: Rename push enum values Change-Id: I2809096774882ba1e7e98e2805ad94f03a70dbdc Reviewed-by: Orgad Shaneh <orgads@gmail.com> --- src/plugins/git/commitdata.cpp | 2 +- src/plugins/git/commitdata.h | 6 +++--- src/plugins/git/gitplugin.cpp | 4 ++-- src/plugins/git/gitsubmiteditorwidget.cpp | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/plugins/git/commitdata.cpp b/src/plugins/git/commitdata.cpp index 129e256d9f7..7654d003722 100644 --- a/src/plugins/git/commitdata.cpp +++ b/src/plugins/git/commitdata.cpp @@ -53,7 +53,7 @@ void GitSubmitEditorPanelData::clear() author.clear(); email.clear(); bypassHooks = false; - pushAction = CommitOnly; + pushAction = NoPush; hasRemotes = false; } diff --git a/src/plugins/git/commitdata.h b/src/plugins/git/commitdata.h index 824f9dfe5d6..deb5072c3d1 100644 --- a/src/plugins/git/commitdata.h +++ b/src/plugins/git/commitdata.h @@ -53,9 +53,9 @@ struct GitSubmitEditorPanelInfo QDebug operator<<(QDebug d, const GitSubmitEditorPanelInfo &); enum PushAction { - CommitOnly, - CommitAndPush, - CommitAndPushToGerrit + NoPush, + NormalPush, + PushToGerrit }; struct GitSubmitEditorPanelData diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 72d9f4bb6db..7d0f918c744 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -1123,9 +1123,9 @@ bool GitPlugin::submitEditorAboutToClose() } if (m_gitClient->checkCommandInProgress(m_submitRepository) == GitClient::NoCommand) { - if (editor->panelData().pushAction == CommitAndPush) + if (editor->panelData().pushAction == NormalPush) m_gitClient->push(m_submitRepository); - else if (editor->panelData().pushAction == CommitAndPushToGerrit) + else if (editor->panelData().pushAction == PushToGerrit) connect(editor, SIGNAL(destroyed()), this, SLOT(delayedPushToGerrit())); } diff --git a/src/plugins/git/gitsubmiteditorwidget.cpp b/src/plugins/git/gitsubmiteditorwidget.cpp index 133e5583f07..7b9260a8ae9 100644 --- a/src/plugins/git/gitsubmiteditorwidget.cpp +++ b/src/plugins/git/gitsubmiteditorwidget.cpp @@ -47,7 +47,7 @@ namespace Internal { // ------------------ GitSubmitEditorWidget::GitSubmitEditorWidget(QWidget *parent) : VcsBase::SubmitEditorWidget(parent), - m_pushAction(CommitOnly), + m_pushAction(NoPush), m_gitSubmitPanel(new QWidget), m_logChangeWidget(0), m_hasUnmerged(false), @@ -171,9 +171,9 @@ QString GitSubmitEditorWidget::cleanupDescription(const QString &input) const QString GitSubmitEditorWidget::commitName() const { - if (m_pushAction == CommitAndPush) + if (m_pushAction == NormalPush) return tr("Commit and Push"); - else if (m_pushAction == CommitAndPushToGerrit) + else if (m_pushAction == PushToGerrit) return tr("Commit and Push to Gerrit"); return tr("Commit"); @@ -194,19 +194,19 @@ void GitSubmitEditorWidget::authorInformationChanged() void GitSubmitEditorWidget::commitOnlySlot() { - m_pushAction = CommitOnly; + m_pushAction = NoPush; updateSubmitAction(); } void GitSubmitEditorWidget::commitAndPushSlot() { - m_pushAction = CommitAndPush; + m_pushAction = NormalPush; updateSubmitAction(); } void GitSubmitEditorWidget::commitAndPushToGerritSlot() { - m_pushAction = CommitAndPushToGerrit; + m_pushAction = PushToGerrit; updateSubmitAction(); } -- GitLab