Commit 0ed1d48c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile with qt5.15

parent a0710156
......@@ -58,15 +58,17 @@ KCMApptSummary::KCMApptSummary(QWidget *parent)
customDaysChanged(7);
connect(mDaysButtonGroup, QOverload<int>::of(
//Remove QOverload<QAbstractButton *> when we switch on qt6. For the moment it avoids to add an #ifdef
connect(mDaysButtonGroup, QOverload<QAbstractButton *>::of(
&QButtonGroup::buttonClicked), this, &KCMApptSummary::modified);
connect(mDaysButtonGroup, QOverload<int>::of(
&QButtonGroup::buttonClicked), this, &KCMApptSummary::buttonClicked);
connect(mShowButtonGroup, QOverload<int>::of(
connect(mShowButtonGroup, QOverload<QAbstractButton *>::of(
&QButtonGroup::buttonClicked), this, &KCMApptSummary::modified);
connect(mGroupwareButtonGroup, QOverload<int>::of(
connect(mGroupwareButtonGroup, QOverload<QAbstractButton *>::of(
&QButtonGroup::buttonClicked), this, &KCMApptSummary::modified);
connect(mDaysButtonGroup, QOverload<QAbstractButton *>::of(
&QButtonGroup::buttonClicked), this, &KCMApptSummary::buttonClicked);
connect(mCustomDays, QOverload<int>::of(
&QSpinBox::valueChanged), this, &KCMApptSummary::modified);
connect(mCustomDays, QOverload<int>::of(
......@@ -82,9 +84,11 @@ void KCMApptSummary::modified()
Q_EMIT changed(true);
}
void KCMApptSummary::buttonClicked(int id)
void KCMApptSummary::buttonClicked(QAbstractButton *button)
{
mCustomDays->setEnabled(id == 2);
if (button) {
mCustomDays->setEnabled(mDaysButtonGroup->id(button) == 2);
}
}
void KCMApptSummary::customDaysChanged(int value)
......
......@@ -47,7 +47,7 @@ public:
private Q_SLOTS:
void modified();
void buttonClicked(int id);
void buttonClicked(QAbstractButton *button);
void customDaysChanged(int value);
private:
......
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