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

Use qoverload

parent 8e6f9a49
......@@ -90,8 +90,8 @@ NoteEditDialog::NoteEditDialog(QWidget *parent)
#endif
mCollectionCombobox->setToolTip(i18n("Calendar where the new note will be stored."));
connect(mCollectionCombobox, static_cast<void (Akonadi::CollectionComboBox::*)(int)>(&Akonadi::CollectionComboBox::currentIndexChanged), this, &NoteEditDialog::slotCollectionChanged);
connect(mCollectionCombobox, static_cast<void (Akonadi::CollectionComboBox::*)(int)>(&Akonadi::CollectionComboBox::activated), this, &NoteEditDialog::slotCollectionChanged);
connect(mCollectionCombobox, QOverload<int>::of(&Akonadi::CollectionComboBox::currentIndexChanged), this, &NoteEditDialog::slotCollectionChanged);
connect(mCollectionCombobox, QOverload<int>::of(&Akonadi::CollectionComboBox::activated), this, &NoteEditDialog::slotCollectionChanged);
mNoteText = new KPIMTextEdit::RichTextEditorWidget(parent);
mNoteText->setObjectName(QStringLiteral("notetext"));
......
......@@ -46,8 +46,8 @@ SearchCollectionHelper::SearchCollectionHelper(QObject *parent)
{
mIdentityManager = KIdentityManagement::IdentityManager::self();
setupSearchCollections();
connect(mIdentityManager, static_cast<void (KIdentityManagement::IdentityManager::*)()>(&KIdentityManagement::IdentityManager::changed), this, &SearchCollectionHelper::updateOpenInvitation);
connect(mIdentityManager, static_cast<void (KIdentityManagement::IdentityManager::*)()>(&KIdentityManagement::IdentityManager::changed), this, &SearchCollectionHelper::updateDeclinedInvitation);
connect(mIdentityManager, QOverload<>::of(&KIdentityManagement::IdentityManager::changed), this, &SearchCollectionHelper::updateOpenInvitation);
connect(mIdentityManager, QOverload<>::of(&KIdentityManagement::IdentityManager::changed), this, &SearchCollectionHelper::updateDeclinedInvitation);
}
void SearchCollectionHelper::setupSearchCollections()
......
......@@ -193,8 +193,8 @@ void ApptSummaryWidget::updateView()
mLayout->addWidget(urlLabel, counter, 3);
mLabels.append(urlLabel);
connect(urlLabel, static_cast<void (KUrlLabel::*)(const QString &)>(&KUrlLabel::leftClickedUrl), this, &ApptSummaryWidget::viewEvent);
connect(urlLabel, static_cast<void (KUrlLabel::*)(const QString &)>(&KUrlLabel::rightClickedUrl), this, &ApptSummaryWidget::popupMenu);
connect(urlLabel, QOverload<const QString &>::of(&KUrlLabel::leftClickedUrl), this, &ApptSummaryWidget::viewEvent);
connect(urlLabel, QOverload<const QString &>::of(&KUrlLabel::rightClickedUrl), this, &ApptSummaryWidget::popupMenu);
if (!event->summaryTooltip.isEmpty()) {
urlLabel->setToolTip(event->summaryTooltip);
}
......
......@@ -56,13 +56,13 @@ KCMApptSummary::KCMApptSummary(QWidget *parent)
customDaysChanged(7);
connect(mDaysButtonGroup, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, &KCMApptSummary::modified);
connect(mDaysButtonGroup, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, &KCMApptSummary::buttonClicked);
connect(mShowButtonGroup, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, &KCMApptSummary::modified);
connect(mGroupwareButtonGroup, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, &KCMApptSummary::modified);
connect(mDaysButtonGroup, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &KCMApptSummary::modified);
connect(mDaysButtonGroup, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &KCMApptSummary::buttonClicked);
connect(mShowButtonGroup, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &KCMApptSummary::modified);
connect(mGroupwareButtonGroup, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &KCMApptSummary::modified);
connect(mCustomDays, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KCMApptSummary::modified);
connect(mCustomDays, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KCMApptSummary::customDaysChanged);
connect(mCustomDays, QOverload<int>::of(&QSpinBox::valueChanged), this, &KCMApptSummary::modified);
connect(mCustomDays, QOverload<int>::of(&QSpinBox::valueChanged), this, &KCMApptSummary::customDaysChanged);
KAcceleratorManager::manage(this);
......
......@@ -53,8 +53,8 @@ KCMTodoSummary::KCMTodoSummary(QWidget *parent)
connect(mHideInProgressBox, &QCheckBox::stateChanged, this, &KCMTodoSummary::modified);
connect(mHideOverdueBox, &QCheckBox::stateChanged, this, &KCMTodoSummary::modified);
connect(mCustomDays, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KCMTodoSummary::modified);
connect(mCustomDays, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KCMTodoSummary::customDaysChanged);
connect(mCustomDays, QOverload<int>::of(&QSpinBox::valueChanged), this, &KCMTodoSummary::modified);
connect(mCustomDays, QOverload<int>::of(&QSpinBox::valueChanged), this, &KCMTodoSummary::customDaysChanged);
connect(mShowMineOnly, &QCheckBox::stateChanged, this, &KCMTodoSummary::modified);
......
......@@ -268,8 +268,8 @@ void TodoSummaryWidget::updateView()
mLayout->addWidget(urlLabel, counter, 4);
mLabels.append(urlLabel);
connect(urlLabel, static_cast<void (KUrlLabel::*)(const QString &)>(&KUrlLabel::leftClickedUrl), this, &TodoSummaryWidget::viewTodo);
connect(urlLabel, static_cast<void (KUrlLabel::*)(const QString &)>(&KUrlLabel::rightClickedUrl), this, &TodoSummaryWidget::popupMenu);
connect(urlLabel, QOverload<const QString &>::of(&KUrlLabel::leftClickedUrl), this, &TodoSummaryWidget::viewTodo);
connect(urlLabel, QOverload<const QString &>::of(&KUrlLabel::rightClickedUrl), this, &TodoSummaryWidget::popupMenu);
/*
Commented out because a ETMCalendar doesn't have any name, it's a group of selected
......
......@@ -50,8 +50,8 @@ KCMSDSummary::KCMSDSummary(QWidget *parent)
connect(mDateMonthButton, &QRadioButton::clicked, this, &KCMSDSummary::modified);
connect(mDateRangeButton, &QRadioButton::clicked, this, &KCMSDSummary::modified);
connect(mCustomDays, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KCMSDSummary::modified);
connect(mCustomDays, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KCMSDSummary::customDaysChanged);
connect(mCustomDays, QOverload<int>::of(&QSpinBox::valueChanged), this, &KCMSDSummary::modified);
connect(mCustomDays, QOverload<int>::of(&QSpinBox::valueChanged), this, &KCMSDSummary::customDaysChanged);
connect(mShowBirthdaysFromCalBox, &QCheckBox::stateChanged, this, &KCMSDSummary::modified);
connect(mShowAnniversariesFromCalBox, &QCheckBox::stateChanged, this, &KCMSDSummary::modified);
......
......@@ -538,8 +538,8 @@ void SDSummaryWidget::createLabels()
mLayout->addWidget(urlLabel, counter, 4);
mLabels.append(urlLabel);
connect(urlLabel, static_cast<void (KUrlLabel::*)(const QString &)>(&KUrlLabel::leftClickedUrl), this, &SDSummaryWidget::mailContact);
connect(urlLabel, static_cast<void (KUrlLabel::*)(const QString &)>(&KUrlLabel::rightClickedUrl), this, &SDSummaryWidget::popupMenu);
connect(urlLabel, QOverload<const QString &>::of(&KUrlLabel::leftClickedUrl), this, &SDSummaryWidget::mailContact);
connect(urlLabel, QOverload<const QString &>::of(&KUrlLabel::rightClickedUrl), this, &SDSummaryWidget::popupMenu);
} else {
label = new QLabel(this);
label->setText((*addrIt).summary);
......
......@@ -253,7 +253,7 @@ public:
mHolidayCombo = new KComboBox(holidayRegBox);
holidayRegBoxHBoxLayout->addWidget(mHolidayCombo);
connect(mHolidayCombo, static_cast<void (KComboBox::*)(int)>(&KComboBox::activated), this, &KOPrefsDialogMain::slotWidChanged);
connect(mHolidayCombo, QOverload<int>::of(&KComboBox::activated), this, &KOPrefsDialogMain::slotWidChanged);
mHolidayCombo->setWhatsThis(KOPrefs::instance()->holidaysItem()->whatsThis());
......@@ -378,7 +378,7 @@ public:
CalendarSupport::KCalPrefs::instance()->reminderTimeItem()->whatsThis());
mReminderTimeSpin->setToolTip(
CalendarSupport::KCalPrefs::instance()->reminderTimeItem()->toolTip());
connect(mReminderTimeSpin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KOPrefsDialogMain::slotWidChanged);
connect(mReminderTimeSpin, QOverload<int>::of(&QSpinBox::valueChanged), this, &KOPrefsDialogMain::slotWidChanged);
remindersLayout->addWidget(mReminderTimeSpin, 0, 1);
mReminderUnitsCombo = new KComboBox(defaultPage);
......@@ -386,7 +386,7 @@ public:
CalendarSupport::KCalPrefs::instance()->reminderTimeUnitsItem()->toolTip());
mReminderUnitsCombo->setWhatsThis(
CalendarSupport::KCalPrefs::instance()->reminderTimeUnitsItem()->whatsThis());
connect(mReminderUnitsCombo, static_cast<void (KComboBox::*)(int)>(&KComboBox::activated), this, &KOPrefsDialogMain::slotWidChanged);
connect(mReminderUnitsCombo, QOverload<int>::of(&KComboBox::activated), this, &KOPrefsDialogMain::slotWidChanged);
mReminderUnitsCombo->addItem(
i18nc("@item:inlistbox reminder units in minutes", "minute(s)"));
mReminderUnitsCombo->addItem(
......@@ -779,7 +779,7 @@ KOPrefsDialogColorsAndFonts::KOPrefsDialogColorsAndFonts(QWidget *parent)
"Select here the event category you want to modify. "
"You can change the selected category color using "
"the button below."));
connect(mCategoryCombo, static_cast<void (KComboBox::*)(int)>(&KComboBox::activated), this, &KOPrefsDialogColorsAndFonts::updateCategoryColor);
connect(mCategoryCombo, QOverload<int>::of(&KComboBox::activated), this, &KOPrefsDialogColorsAndFonts::updateCategoryColor);
categoryLayout->addWidget(mCategoryCombo, 1, 0);
mCategoryButton = new KColorButton(categoryGroup);
......@@ -812,7 +812,7 @@ KOPrefsDialogColorsAndFonts::KOPrefsDialogColorsAndFonts(QWidget *parent)
"Select the calendar you want to modify. "
"You can change the selected calendar color using "
"the button below."));
connect(mResourceCombo, static_cast<void (Akonadi::CollectionComboBox::*)(int)>(&Akonadi::CollectionComboBox::activated), this, &KOPrefsDialogColorsAndFonts::updateResourceColor);
connect(mResourceCombo, QOverload<int>::of(&Akonadi::CollectionComboBox::activated), this, &KOPrefsDialogColorsAndFonts::updateResourceColor);
resourceLayout->addWidget(mResourceCombo);
mResourceButton = new KColorButton(resourceGroup);
......@@ -1030,7 +1030,7 @@ KOPrefsDialogGroupwareScheduling::KOPrefsDialogGroupwareScheduling(QWidget *pare
// signals and slots connections
connect(mGroupwarePage->publishDays, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KOPrefsDialogGroupwareScheduling::slotWidChanged);
connect(mGroupwarePage->publishDays, QOverload<int>::of(&QSpinBox::valueChanged), this, &KOPrefsDialogGroupwareScheduling::slotWidChanged);
connect(mGroupwarePage->publishUrl, &QLineEdit::textChanged, this, &KOPrefsDialogGroupwareScheduling::slotWidChanged);
connect(mGroupwarePage->publishUser, &QLineEdit::textChanged, this, &KOPrefsDialogGroupwareScheduling::slotWidChanged);
connect(mGroupwarePage->publishPassword, &QLineEdit::textChanged, this, &KOPrefsDialogGroupwareScheduling::slotWidChanged);
......@@ -1040,7 +1040,7 @@ KOPrefsDialogGroupwareScheduling::KOPrefsDialogGroupwareScheduling(QWidget *pare
connect(mGroupwarePage->retrievePassword, &QLineEdit::textChanged, this, &KOPrefsDialogGroupwareScheduling::slotWidChanged);
connect(mGroupwarePage->retrieveSavePassword, &QCheckBox::toggled, this, &KOPrefsDialogGroupwareScheduling::slotWidChanged);
connect(mGroupwarePage->retrieveUrl, &QLineEdit::textChanged, this, &KOPrefsDialogGroupwareScheduling::slotWidChanged);
connect(mGroupwarePage->publishDelay, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &KOPrefsDialogGroupwareScheduling::slotWidChanged);
connect(mGroupwarePage->publishDelay, QOverload<int>::of(&QSpinBox::valueChanged), this, &KOPrefsDialogGroupwareScheduling::slotWidChanged);
connect(mGroupwarePage->fullDomainRetrieval, &QCheckBox::toggled, this, &KOPrefsDialogGroupwareScheduling::slotWidChanged);
connect(mGroupwarePage->publishEnable, &QCheckBox::toggled, this, &KOPrefsDialogGroupwareScheduling::slotWidChanged);
......
......@@ -336,8 +336,7 @@ MultiAgendaViewConfigDialog::MultiAgendaViewConfigDialog(QAbstractItemModel *bas
mainLayout->addWidget(widget);
d->ui.columnList->setModel(&d->listModel);
connect(d->ui.columnList->selectionModel(),
&QItemSelectionModel::currentChanged,
connect(d->ui.columnList->selectionModel(), &QItemSelectionModel::currentChanged,
this, &MultiAgendaViewConfigDialog::currentChanged);
connect(d->ui.useCustomRB, &QAbstractButton::toggled,
this, &MultiAgendaViewConfigDialog::useCustomToggled);
......
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