Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 18b2a1be authored by Rolf Eike Beer's avatar Rolf Eike Beer

use QOverload<>::of() instead of static:cast<>

parent 2fdc055c
......@@ -98,14 +98,14 @@ KCalculator::KCalculator(QWidget *parent) :
base_choose_group_->addButton(decRadio, DecMode);
base_choose_group_->addButton(octRadio, OctMode);
base_choose_group_->addButton(binRadio, BinMode);
connect(base_choose_group_, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, &KCalculator::slotBaseSelected);
connect(base_choose_group_, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &KCalculator::slotBaseSelected);
angle_choose_group_ = new QButtonGroup(this);
angle_choose_group_->setExclusive(true);
angle_choose_group_->addButton(degRadio, DegMode);
angle_choose_group_->addButton(radRadio, RadMode);
angle_choose_group_->addButton(gradRadio, GradMode);
connect(angle_choose_group_, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, &KCalculator::slotAngleSelected);
connect(angle_choose_group_, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &KCalculator::slotAngleSelected);
// additional menu setup
constants_menu_ = createConstantsMenu();
......@@ -243,7 +243,7 @@ KCalcStatusBar *KCalculator::statusBar() {
void KCalculator::setupNumberKeys() {
num_button_group_ = new QButtonGroup(this);
connect(num_button_group_, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, &KCalculator::slotNumberclicked);
connect(num_button_group_, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &KCalculator::slotNumberclicked);
num_button_group_->addButton(pb0, 0);
num_button_group_->addButton(pb1, 1);
......
......@@ -63,7 +63,7 @@ KCalcBitset::KCalcBitset(QWidget *parent) : QFrame(parent), value_(0) {
setFrameStyle(QFrame::Panel | QFrame::Sunken);
bit_button_group_ = new QButtonGroup(this);
connect(bit_button_group_, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, &KCalcBitset::slotToggleBit);
connect(bit_button_group_, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &KCalcBitset::slotToggleBit);
// smaller label font
QFont fnt = font();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment