forked from qt-creator/qt-creator
Git: Rename push enum values
Change-Id: I2809096774882ba1e7e98e2805ad94f03a70dbdc Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
13a0b348be
commit
6cf030d8d3
@@ -53,7 +53,7 @@ void GitSubmitEditorPanelData::clear()
|
||||
author.clear();
|
||||
email.clear();
|
||||
bypassHooks = false;
|
||||
pushAction = CommitOnly;
|
||||
pushAction = NoPush;
|
||||
hasRemotes = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,9 +53,9 @@ struct GitSubmitEditorPanelInfo
|
||||
QDebug operator<<(QDebug d, const GitSubmitEditorPanelInfo &);
|
||||
|
||||
enum PushAction {
|
||||
CommitOnly,
|
||||
CommitAndPush,
|
||||
CommitAndPushToGerrit
|
||||
NoPush,
|
||||
NormalPush,
|
||||
PushToGerrit
|
||||
};
|
||||
|
||||
struct GitSubmitEditorPanelData
|
||||
|
||||
@@ -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()));
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user