Commit 93c19af4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use qOverload directly (scripted)

parent b72d4467
Pipeline #77334 passed with stage
in 11 minutes and 28 seconds
......@@ -42,18 +42,18 @@ KCMAkonadiContactActions::KCMAkonadiContactActions(QWidget *parent, const QVaria
ui.DialPhoneNumberAction->addItem(i18n("Ekiga"), ContactActionsSettings::UseEkiga);
ui.DialPhoneNumberAction->addItem(i18n("SflPhone"), ContactActionsSettings::UseSflPhone);
ui.DialPhoneNumberAction->addItem(i18n("External Application"), ContactActionsSettings::UseExternalPhoneApplication);
connect(ui.DialPhoneNumberAction, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &KCMAkonadiContactActions::slotDialPhoneNumberActionChanged);
connect(ui.DialPhoneNumberAction, qOverload<int>(&QComboBox::currentIndexChanged), this, &KCMAkonadiContactActions::slotDialPhoneNumberActionChanged);
ui.SendSmsAction->addItem(i18n("System Default"), ContactActionsSettings::UseSystemDefaultSms);
ui.SendSmsAction->addItem(i18n("Skype"), ContactActionsSettings::UseSkypeSms);
ui.SendSmsAction->addItem(i18n("SflPhone"), ContactActionsSettings::UseSflPhoneSms);
ui.SendSmsAction->addItem(i18n("External Application"), ContactActionsSettings::UseExternalSmsApplication);
connect(ui.SendSmsAction, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &KCMAkonadiContactActions::slotSmsPhoneNumberActionChanged);
connect(ui.SendSmsAction, qOverload<int>(&QComboBox::currentIndexChanged), this, &KCMAkonadiContactActions::slotSmsPhoneNumberActionChanged);
ui.ShowAddressAction->addItem(i18n("Web Browser"), ContactActionsSettings::UseBrowser);
ui.ShowAddressAction->addItem(i18n("External Application"), ContactActionsSettings::UseExternalAddressApplication);
ui.ShowAddressAction->addItem(i18n("Google map"), ContactActionsSettings::UseGooglemap);
ui.ShowAddressAction->addItem(i18n("Map quest"), ContactActionsSettings::UseMapquest);
ui.ShowAddressAction->addItem(i18n("OpenStreetMap"), ContactActionsSettings::UseOpenStreetMap);
connect(ui.ShowAddressAction, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &KCMAkonadiContactActions::slotShowAddressActionChanged);
connect(ui.ShowAddressAction, qOverload<int>(&QComboBox::currentIndexChanged), this, &KCMAkonadiContactActions::slotShowAddressActionChanged);
load();
}
......
......@@ -225,7 +225,7 @@ ContactGroupEditor::ContactGroupEditor(Mode mode, QWidget *parent)
QTimer::singleShot(0, this, [this]() {
d->adaptHeaderSizes();
});
QTimer::singleShot(0, d->mGui.groupName, QOverload<>::of(&ContactGroupEditor::setFocus));
QTimer::singleShot(0, d->mGui.groupName, qOverload<>(&ContactGroupEditor::setFocus));
}
d->mGui.membersView->header()->setStretchLastSection(true);
......
......@@ -60,7 +60,7 @@ ContactLineEdit::ContactLineEdit(bool isReference, ContactCompletionModel::Colum
auto completer = new QCompleter(filter, this);
completer->setCompletionColumn(column);
completer->setCaseSensitivity(Qt::CaseInsensitive);
connect(completer, QOverload<const QModelIndex &>::of(&QCompleter::activated), this, QOverload<const QModelIndex &>::of(&ContactLineEdit::completed));
connect(completer, qOverload<const QModelIndex &>(&QCompleter::activated), this, qOverload<const QModelIndex &>(&ContactLineEdit::completed));
setCompleter(completer);
......@@ -128,7 +128,7 @@ QWidget *ContactGroupEditorDelegate::createEditor(QWidget *parent, const QStyleO
Q_UNUSED(option)
if (index.column() == 0) {
auto edit = new ContactLineEdit(isReference, ContactCompletionModel::NameAndEmailColumn, parent);
connect(edit, QOverload<QWidget *>::of(&ContactLineEdit::completed), this, &ContactGroupEditorDelegate::completed);
connect(edit, qOverload<QWidget *>(&ContactLineEdit::completed), this, &ContactGroupEditorDelegate::completed);
return edit;
} else {
......@@ -139,7 +139,7 @@ QWidget *ContactGroupEditorDelegate::createEditor(QWidget *parent, const QStyleO
return comboBox;
} else {
auto edit = new ContactLineEdit(isReference, ContactCompletionModel::NameAndEmailColumn, parent);
connect(edit, QOverload<QWidget *>::of(&ContactLineEdit::completed), this, &ContactGroupEditorDelegate::completed);
connect(edit, qOverload<QWidget *>(&ContactLineEdit::completed), this, &ContactGroupEditorDelegate::completed);
return edit;
}
}
......
......@@ -154,7 +154,7 @@ void EmailAddressSelectionWidget::Private::init()
q->connect(mSearchLine, &QLineEdit::textChanged, filter, &ContactsFilterProxyModel::setFilterString);
q->connect(mView, QOverload<const Akonadi::Item &>::of(&Akonadi::EntityTreeView::doubleClicked), q, [this]() {
q->connect(mView, qOverload<const Akonadi::Item &>(&Akonadi::EntityTreeView::doubleClicked), q, [this]() {
Q_EMIT q->doubleClicked();
});
ControlGui::widgetNeedsAkonadi(q);
......
......@@ -29,7 +29,7 @@ MainWidget::MainWidget()
auto box = new KComboBox;
box->addItem(QStringLiteral("Single Selection"));
box->addItem(QStringLiteral("Multi Selection"));
connect(box, QOverload<int>::of(&KComboBox::activated), this, &MainWidget::selectionModeChanged);
connect(box, qOverload<int>(&KComboBox::activated), this, &MainWidget::selectionModeChanged);
layout->addWidget(box, 1, 0);
auto button = new QPushButton(QStringLiteral("Show Selection"));
......
......@@ -107,7 +107,7 @@ DisplayNameEditWidget::DisplayNameEditWidget(QWidget *parent)
layout->addWidget(mView);
setFocusProxy(mView);
setFocusPolicy(Qt::StrongFocus);
connect(mView, QOverload<int>::of(&KComboBox::activated), this, &DisplayNameEditWidget::displayTypeChanged);
connect(mView, qOverload<int>(&KComboBox::activated), this, &DisplayNameEditWidget::displayTypeChanged);
auto delegate = new DisplayNameDelegate(mView->view(), this);
mView->view()->setItemDelegate(delegate);
......
......@@ -30,7 +30,7 @@ PhoneComboBoxType::PhoneComboBoxType(QWidget *parent)
update();
connect(this, QOverload<int>::of(&PhoneComboBoxType::activated), this, &PhoneComboBoxType::selected);
connect(this, qOverload<int>(&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