diff --git a/src/plugins/git/gerrit/gerritdialog.cpp b/src/plugins/git/gerrit/gerritdialog.cpp index 7b1f55e8cf8d9aa1f8683203b1f29a36b5870f00..28512fcaac60e480ebd40f86fdb735a4710fb01d 100644 --- a/src/plugins/git/gerrit/gerritdialog.cpp +++ b/src/plugins/git/gerrit/gerritdialog.cpp @@ -162,7 +162,7 @@ GerritDialog::GerritDialog(const QSharedPointer<GerritParameters> &p, detailsLayout->addLayout(repoPathLayout); m_displayButton = addActionButton(QString(), SLOT(slotFetchDisplay())); - m_applyButton = addActionButton(QString(), SLOT(slotFetchApply())); + m_cherryPickButton = addActionButton(QString(), SLOT(slotFetchCherryPick())); m_checkoutButton = addActionButton(QString(), SLOT(slotFetchCheckout())); m_refreshButton = addActionButton(tr("Refresh"), SLOT(slotRefresh())); @@ -203,11 +203,11 @@ void GerritDialog::displayRepositoryPath() m_repositoryChooser->setPath(m_parameters->repositoryPath); if (m_parameters->promptPath) { m_displayButton->setText(tr("Diff...")); - m_applyButton->setText(tr("Apply...")); + m_cherryPickButton->setText(tr("Cherry Pick...")); m_checkoutButton->setText(tr("Checkout...")); } else { m_displayButton->setText(tr("Diff")); - m_applyButton->setText(tr("Apply")); + m_cherryPickButton->setText(tr("Cherry Pick")); m_checkoutButton->setText(tr("Checkout")); } } @@ -262,10 +262,10 @@ void GerritDialog::slotFetchDisplay() emit fetchDisplay(m_model->change(item->row())); } -void GerritDialog::slotFetchApply() +void GerritDialog::slotFetchCherryPick() { if (const QStandardItem *item = currentItem()) - emit fetchApply(m_model->change(item->row())); + emit fetchCherryPick(m_model->change(item->row())); } void GerritDialog::slotFetchCheckout() @@ -304,7 +304,7 @@ void GerritDialog::updateButtons() { const bool enabled = !m_fetchRunning && m_treeView->selectionModel()->currentIndex().isValid(); m_displayButton->setEnabled(enabled); - m_applyButton->setEnabled(enabled); + m_cherryPickButton->setEnabled(enabled); m_checkoutButton->setEnabled(enabled); } @@ -328,7 +328,7 @@ void GerritDialog::fetchStarted(const QSharedPointer<Gerrit::Internal::GerritCha updateButtons(); const QString toolTip = tr("Fetching \"%1\"...").arg(change->title); m_displayButton->setToolTip(toolTip); - m_applyButton->setToolTip(toolTip); + m_cherryPickButton->setToolTip(toolTip); m_checkoutButton->setToolTip(toolTip); } @@ -337,7 +337,7 @@ void GerritDialog::fetchFinished() m_fetchRunning = false; updateButtons(); m_displayButton->setToolTip(QString()); - m_applyButton->setToolTip(QString()); + m_cherryPickButton->setToolTip(QString()); m_checkoutButton->setToolTip(QString()); } diff --git a/src/plugins/git/gerrit/gerritdialog.h b/src/plugins/git/gerrit/gerritdialog.h index 2aa8d96ac1fe2bc37994ed5ea06ec3f955ed955a..7d8d1275c31f89d88e535d1dc744dbda02e80a8b 100644 --- a/src/plugins/git/gerrit/gerritdialog.h +++ b/src/plugins/git/gerrit/gerritdialog.h @@ -83,7 +83,7 @@ public: signals: void fetchDisplay(const QSharedPointer<Gerrit::Internal::GerritChange> &); - void fetchApply(const QSharedPointer<Gerrit::Internal::GerritChange> &); + void fetchCherryPick(const QSharedPointer<Gerrit::Internal::GerritChange> &); void fetchCheckout(const QSharedPointer<Gerrit::Internal::GerritChange> &); public slots: @@ -98,7 +98,7 @@ private slots: void slotDoubleClicked(const QModelIndex &); void slotRefreshStateChanged(bool); void slotFetchDisplay(); - void slotFetchApply(); + void slotFetchCherryPick(); void slotFetchCheckout(); void slotRefresh(); void displayRepositoryPath(); @@ -121,7 +121,7 @@ private: Utils::PathChooser *m_repositoryChooser; QDialogButtonBox *m_buttonBox; QPushButton *m_displayButton; - QPushButton *m_applyButton; + QPushButton *m_cherryPickButton; QPushButton *m_checkoutButton; QPushButton *m_refreshButton; QLabel *m_repositoryChooserLabel; diff --git a/src/plugins/git/gerrit/gerritplugin.cpp b/src/plugins/git/gerrit/gerritplugin.cpp index e3403ca91eec96c79d19165d87f189facde2ab71..511b92cdd8b91b38fdd6473fa05616ec4e625f1a 100644 --- a/src/plugins/git/gerrit/gerritplugin.cpp +++ b/src/plugins/git/gerrit/gerritplugin.cpp @@ -79,7 +79,7 @@ namespace Internal { enum FetchMode { FetchDisplay, - FetchApply, + FetchCherryPick, FetchCheckout }; @@ -202,9 +202,9 @@ void FetchContext::processFinished(int exitCode, QProcess::ExitStatus es) m_state = WritePatchFileState; startWritePatchFile(); break; - case FetchApply: + case FetchCherryPick: case FetchCheckout: - if (m_fetchMode == FetchApply) { + if (m_fetchMode == FetchCherryPick) { cherryPick(); } else { Git::Internal::GitPlugin::instance()->gitClient()->synchronousCheckout( @@ -425,8 +425,8 @@ void GerritPlugin::openView() gd->setModal(false); connect(gd, SIGNAL(fetchDisplay(QSharedPointer<Gerrit::Internal::GerritChange>)), this, SLOT(fetchDisplay(QSharedPointer<Gerrit::Internal::GerritChange>))); - connect(gd, SIGNAL(fetchApply(QSharedPointer<Gerrit::Internal::GerritChange>)), - this, SLOT(fetchApply(QSharedPointer<Gerrit::Internal::GerritChange>))); + connect(gd, SIGNAL(fetchCherryPick(QSharedPointer<Gerrit::Internal::GerritChange>)), + this, SLOT(fetchCherryPick(QSharedPointer<Gerrit::Internal::GerritChange>))); connect(gd, SIGNAL(fetchCheckout(QSharedPointer<Gerrit::Internal::GerritChange>)), this, SLOT(fetchCheckout(QSharedPointer<Gerrit::Internal::GerritChange>))); connect(this, SIGNAL(fetchStarted(QSharedPointer<Gerrit::Internal::GerritChange>)), @@ -464,9 +464,9 @@ void GerritPlugin::fetchDisplay(const QSharedPointer<Gerrit::Internal::GerritCha fetch(change, FetchDisplay); } -void GerritPlugin::fetchApply(const QSharedPointer<Gerrit::Internal::GerritChange> &change) +void GerritPlugin::fetchCherryPick(const QSharedPointer<Gerrit::Internal::GerritChange> &change) { - fetch(change, FetchApply); + fetch(change, FetchCherryPick); } void GerritPlugin::fetchCheckout(const QSharedPointer<Gerrit::Internal::GerritChange> &change) diff --git a/src/plugins/git/gerrit/gerritplugin.h b/src/plugins/git/gerrit/gerritplugin.h index 167c9c9aa3a7393dcf901d3ee7466386d737ab46..aafb083dbd46e69b71e803a8c164a6d92277fe1e 100644 --- a/src/plugins/git/gerrit/gerritplugin.h +++ b/src/plugins/git/gerrit/gerritplugin.h @@ -70,7 +70,7 @@ public: public slots: void fetchDisplay(const QSharedPointer<Gerrit::Internal::GerritChange> &change); - void fetchApply(const QSharedPointer<Gerrit::Internal::GerritChange> &change); + void fetchCherryPick(const QSharedPointer<Gerrit::Internal::GerritChange> &change); void fetchCheckout(const QSharedPointer<Gerrit::Internal::GerritChange> &change); void updateActions(bool hasTopLevel);