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 e1389ca4 authored by Laurent Montel's avatar Laurent Montel 😁

USe QOverload

parent d593b3c4
......@@ -153,8 +153,7 @@ QWidget *ContactGroupEditorDelegate::createEditor(QWidget *parent, const QStyleO
return comboBox;
} else {
auto edit = new ContactLineEdit(isReference, ContactCompletionModel::EmailColumn, parent);
connect(edit, static_cast<void (ContactLineEdit::*)(QWidget *)>(&ContactLineEdit::completed),
this, &ContactGroupEditorDelegate::completed);
connect(edit, QOverload<QWidget *>::of(&ContactLineEdit::completed), this, &ContactGroupEditorDelegate::completed);
return edit;
}
}
......
......@@ -44,7 +44,7 @@ MainWidget::MainWidget()
KComboBox *box = new KComboBox;
box->addItem(QStringLiteral("Single Selection"));
box->addItem(QStringLiteral("Multi Selection"));
connect(box, static_cast<void (KComboBox::*)(int)>(&KComboBox::activated), this, &MainWidget::selectionModeChanged);
connect(box, QOverload<int>::of(&KComboBox::activated), this, &MainWidget::selectionModeChanged);
layout->addWidget(box, 1, 0);
QPushButton *button = new QPushButton(QStringLiteral("Show Selection"));
......
......@@ -123,7 +123,7 @@ DisplayNameEditWidget::DisplayNameEditWidget(QWidget *parent)
layout->addWidget(mView);
setFocusProxy(mView);
setFocusPolicy(Qt::StrongFocus);
connect(mView, static_cast<void (KComboBox::*)(int)>(&KComboBox::activated), this, &DisplayNameEditWidget::displayTypeChanged);
connect(mView, QOverload<int>::of(&KComboBox::activated), this, &DisplayNameEditWidget::displayTypeChanged);
DisplayNameDelegate *delegate = new DisplayNameDelegate(mView->view());
mView->view()->setItemDelegate(delegate);
......
......@@ -45,7 +45,7 @@ PhoneComboBoxType::PhoneComboBoxType(QWidget *parent)
update();
connect(this, static_cast<void (PhoneComboBoxType::*)(int)>(&PhoneComboBoxType::activated), this, &PhoneComboBoxType::selected);
connect(this, QOverload<int>::of(&PhoneComboBoxType::activated), this, &PhoneComboBoxType::selected);
}
PhoneComboBoxType::~PhoneComboBoxType()
......
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