forked from qt-creator/qt-creator
Git: Added Checkout Commit
Change-Id: I9446060b9a8ee1717b832f1f7b7dbcaf8e739ad3 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -53,6 +53,7 @@ ChangeSelectionDialog::ChangeSelectionDialog(const QString &workingDirectory, QW
|
||||
, m_showButton(new QPushButton(tr("Show"), this))
|
||||
, m_cherryPickButton(new QPushButton(tr("Cherry Pick"), this))
|
||||
, m_revertButton(new QPushButton(tr("Revert"), this))
|
||||
, m_checkoutButton(new QPushButton(tr("Checkout"), this))
|
||||
, m_cancelButton(new QPushButton(tr("Cancel"), this))
|
||||
, m_command(NoCommand)
|
||||
{
|
||||
@@ -71,6 +72,7 @@ ChangeSelectionDialog::ChangeSelectionDialog(const QString &workingDirectory, QW
|
||||
QHBoxLayout* buttonsLine = new QHBoxLayout();
|
||||
buttonsLine->addWidget(m_cancelButton);
|
||||
buttonsLine->addStretch();
|
||||
buttonsLine->addWidget(m_checkoutButton);
|
||||
buttonsLine->addWidget(m_revertButton);
|
||||
buttonsLine->addWidget(m_cherryPickButton);
|
||||
buttonsLine->addWidget(m_showButton);
|
||||
@@ -91,6 +93,7 @@ ChangeSelectionDialog::ChangeSelectionDialog(const QString &workingDirectory, QW
|
||||
connect(m_showButton, SIGNAL(clicked()), this, SLOT(acceptShow()));
|
||||
connect(m_cherryPickButton, SIGNAL(clicked()), this, SLOT(acceptCherryPick()));
|
||||
connect(m_revertButton, SIGNAL(clicked()), this, SLOT(acceptRevert()));
|
||||
connect(m_checkoutButton, SIGNAL(clicked()), this, SLOT(acceptCheckout()));
|
||||
connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
|
||||
recalculateDetails(m_changeNumberEdit->text());
|
||||
@@ -116,6 +119,12 @@ ChangeCommand ChangeSelectionDialog::command() const
|
||||
return m_command;
|
||||
}
|
||||
|
||||
void ChangeSelectionDialog::acceptCheckout()
|
||||
{
|
||||
m_command = Checkout;
|
||||
accept();
|
||||
}
|
||||
|
||||
void ChangeSelectionDialog::acceptCherryPick()
|
||||
{
|
||||
m_command = CherryPick;
|
||||
|
||||
Reference in New Issue
Block a user