From 03fab2cdc0f4146cdaaae549ca5eb8dd4716c98a Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 23 Apr 2020 11:06:10 +0200 Subject: [PATCH] Git: Fix clang warning src/plugins/git/changeselectiondialog.h:72: warning: 'Git::Internal::ChangeSelectionDialog::accept' hides overloaded virtual function [-Woverloaded-virtual] void accept(ChangeCommand command); ^ Change-Id: Ia0685c2347e943687e2c0ad34b4d456a30912d0a Reviewed-by: Orgad Shaneh --- src/plugins/git/changeselectiondialog.cpp | 12 ++++++------ src/plugins/git/changeselectiondialog.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/git/changeselectiondialog.cpp b/src/plugins/git/changeselectiondialog.cpp index f14cbf8f9d2..9872112bdf7 100644 --- a/src/plugins/git/changeselectiondialog.cpp +++ b/src/plugins/git/changeselectiondialog.cpp @@ -74,15 +74,15 @@ ChangeSelectionDialog::ChangeSelectionDialog(const QString &workingDirectory, Co connect(m_ui->selectFromHistoryButton, &QPushButton::clicked, this, &ChangeSelectionDialog::selectCommitFromRecentHistory); connect(m_ui->showButton, &QPushButton::clicked, - this, std::bind(&ChangeSelectionDialog::accept, this, Show)); + this, std::bind(&ChangeSelectionDialog::acceptCommand, this, Show)); connect(m_ui->cherryPickButton, &QPushButton::clicked, - this, std::bind(&ChangeSelectionDialog::accept, this, CherryPick)); + this, std::bind(&ChangeSelectionDialog::acceptCommand, this, CherryPick)); connect(m_ui->revertButton, &QPushButton::clicked, - this, std::bind(&ChangeSelectionDialog::accept, this, Revert)); + this, std::bind(&ChangeSelectionDialog::acceptCommand, this, Revert)); connect(m_ui->checkoutButton, &QPushButton::clicked, - this, std::bind(&ChangeSelectionDialog::accept, this, Checkout)); + this, std::bind(&ChangeSelectionDialog::acceptCommand, this, Checkout)); connect(m_ui->archiveButton, &QPushButton::clicked, - this, std::bind(&ChangeSelectionDialog::accept, this, Archive)); + this, std::bind(&ChangeSelectionDialog::acceptCommand, this, Archive)); if (id == "Git.Revert") m_ui->revertButton->setDefault(true); @@ -149,7 +149,7 @@ ChangeCommand ChangeSelectionDialog::command() const return m_command; } -void ChangeSelectionDialog::accept(ChangeCommand command) +void ChangeSelectionDialog::acceptCommand(ChangeCommand command) { m_command = command; QDialog::accept(); diff --git a/src/plugins/git/changeselectiondialog.h b/src/plugins/git/changeselectiondialog.h index 84e888756b4..b7714cece6e 100644 --- a/src/plugins/git/changeselectiondialog.h +++ b/src/plugins/git/changeselectiondialog.h @@ -69,7 +69,7 @@ private: void recalculateCompletion(); void recalculateDetails(); void changeTextChanged(const QString &text); - void accept(ChangeCommand command); + void acceptCommand(ChangeCommand command); void enableButtons(bool b); void terminateProcess();