Commit 7201eacf authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile against qt5.15

parent 62ece6ad
......@@ -130,7 +130,11 @@ IncidenceAttendee::IncidenceAttendee(QWidget *parent, IncidenceDateTime *dateTim
connect(mUi->mOrganizerCombo, qOverload<const QString &>(&QComboBox::activated),
this, &IncidenceAttendee::slotOrganizerChanged);
*/
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mUi->mOrganizerCombo, qOverload<int>(&QComboBox::currentIndexChanged),
#else
connect(mUi->mOrganizerCombo, qOverload<int, const QString &>(&QComboBox::currentIndexChanged),
#endif
this, &IncidenceAttendee::checkDirtyStatus);
connect(mDateTime, &IncidenceDateTime::startDateChanged, this,
......
......@@ -73,7 +73,11 @@ IncidenceCompletionPriority::IncidenceCompletionPriority(Ui::EventOrTodoDesktop
connect(d->mUi->mCompletionSlider, qOverload<int>(&QSlider::valueChanged), this, [this](int val) {
d->sliderValueChanged(val);
});
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(d->mUi->mPriorityCombo, qOverload< int>(&QComboBox::currentIndexChanged), this, &IncidenceCompletionPriority::checkDirtyStatus);
#else
connect(d->mUi->mPriorityCombo, qOverload<int, const QString &>(&QComboBox::currentIndexChanged), this, &IncidenceCompletionPriority::checkDirtyStatus);
#endif
}
IncidenceCompletionPriority::~IncidenceCompletionPriority()
......
......@@ -554,12 +554,23 @@ void IncidenceDateTime::load(const KCalendarCore::Event::Ptr &event, bool isTemp
&IncidenceDateTime::updateStartTime); // When editing with any key except up/down
connect(mUi->mStartDateEdit, &KDateComboBox::dateChanged, this,
&IncidenceDateTime::updateStartDate);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mUi->mTimeZoneComboStart,
static_cast<void (IncidenceEditorNG::KTimeZoneComboBox::*)(int)>(&IncidenceEditorNG::
KTimeZoneComboBox::
currentIndexChanged),
this,
&IncidenceDateTime::updateStartSpec);
#else
connect(mUi->mTimeZoneComboStart,
static_cast<void (IncidenceEditorNG::KTimeZoneComboBox::*)(int, const QString &)>(&IncidenceEditorNG::
KTimeZoneComboBox::
currentIndexChanged),
this,
&IncidenceDateTime::updateStartSpec);
#endif
// End time
connect(mUi->mEndTimeEdit, &KTimeComboBox::timeChanged, this,
&IncidenceDateTime::checkDirtyStatus);
......@@ -573,13 +584,21 @@ void IncidenceDateTime::load(const KCalendarCore::Event::Ptr &event, bool isTemp
&IncidenceDateTime::endTimeChanged);
connect(mUi->mEndDateEdit, &KDateComboBox::dateChanged, this,
&IncidenceDateTime::endDateChanged);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mUi->mTimeZoneComboEnd,
static_cast<void (IncidenceEditorNG::KTimeZoneComboBox::*)(int)>(&IncidenceEditorNG::
KTimeZoneComboBox::
currentIndexChanged),
this,
&IncidenceDateTime::checkDirtyStatus);
#else
connect(mUi->mTimeZoneComboEnd,
static_cast<void (IncidenceEditorNG::KTimeZoneComboBox::*)(int, const QString &)>(&IncidenceEditorNG::
KTimeZoneComboBox::
currentIndexChanged),
this,
&IncidenceDateTime::checkDirtyStatus);
#endif
mUi->mWholeDayCheck->setChecked(event->allDay());
enableTimeEdits();
......@@ -622,13 +641,21 @@ void IncidenceDateTime::load(const KCalendarCore::Journal::Ptr &journal, bool is
&IncidenceDateTime::updateStartTime);
connect(mUi->mStartDateEdit, &KDateComboBox::dateChanged, this,
&IncidenceDateTime::updateStartDate);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mUi->mTimeZoneComboStart,
static_cast<void (IncidenceEditorNG::KTimeZoneComboBox::*)(int)>(&IncidenceEditorNG::
KTimeZoneComboBox::
currentIndexChanged),
this,
&IncidenceDateTime::updateStartSpec);
#else
connect(mUi->mTimeZoneComboStart,
static_cast<void (IncidenceEditorNG::KTimeZoneComboBox::*)(int, const QString &)>(&IncidenceEditorNG::
KTimeZoneComboBox::
currentIndexChanged),
this,
&IncidenceDateTime::updateStartSpec);
#endif
mUi->mWholeDayCheck->setChecked(journal->allDay());
enableTimeEdits();
......@@ -680,12 +707,22 @@ void IncidenceDateTime::load(const KCalendarCore::Todo::Ptr &todo, bool isTempla
&IncidenceDateTime::updateStartTime);
connect(mUi->mStartTimeEdit, &KTimeComboBox::timeEdited, this,
&IncidenceDateTime::checkDirtyStatus);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mUi->mTimeZoneComboStart,
static_cast<void (IncidenceEditorNG::KTimeZoneComboBox::*)(int)>(&IncidenceEditorNG::
KTimeZoneComboBox::
currentIndexChanged),
this,
&IncidenceDateTime::checkDirtyStatus);
#else
connect(mUi->mTimeZoneComboStart,
static_cast<void (IncidenceEditorNG::KTimeZoneComboBox::*)(int, const QString &)>(&IncidenceEditorNG::
KTimeZoneComboBox::
currentIndexChanged),
this,
&IncidenceDateTime::checkDirtyStatus);
#endif
connect(mUi->mEndCheck, &QCheckBox::toggled, this, &IncidenceDateTime::enableEndEdit);
connect(mUi->mEndCheck, &QCheckBox::toggled, this, &IncidenceDateTime::endDateTimeToggled);
......@@ -699,13 +736,21 @@ void IncidenceDateTime::load(const KCalendarCore::Todo::Ptr &todo, bool isTempla
&IncidenceDateTime::endDateChanged);
connect(mUi->mEndTimeEdit, &KTimeComboBox::timeChanged, this,
&IncidenceDateTime::endTimeChanged);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mUi->mTimeZoneComboEnd,
static_cast<void (IncidenceEditorNG::KTimeZoneComboBox::*)(int)>(&IncidenceEditorNG::
KTimeZoneComboBox::
currentIndexChanged),
this,
&IncidenceDateTime::checkDirtyStatus);
#else
connect(mUi->mTimeZoneComboEnd,
static_cast<void (IncidenceEditorNG::KTimeZoneComboBox::*)(int, const QString &)>(&IncidenceEditorNG::
KTimeZoneComboBox::
currentIndexChanged),
this,
&IncidenceDateTime::checkDirtyStatus);
#endif
const QDateTime rightNow = QDateTime::currentDateTime();
if (isTemplate) {
......
......@@ -105,19 +105,39 @@ IncidenceRecurrence::IncidenceRecurrence(IncidenceDateTime *dateTime, Ui::EventO
&IncidenceRecurrence::handleExceptionDateChange);
connect(mUi->mExceptionList, &QListWidget::itemSelectionChanged, this,
&IncidenceRecurrence::updateRemoveExceptionButton);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mUi->mRecurrenceTypeCombo, qOverload<int>(&QComboBox::currentIndexChanged), this, &IncidenceRecurrence::handleRecurrenceTypeChange);
#else
connect(mUi->mRecurrenceTypeCombo, qOverload<int, const QString &>(&QComboBox::currentIndexChanged), this, &IncidenceRecurrence::handleRecurrenceTypeChange);
#endif
connect(mUi->mEndDurationEdit, qOverload<int>(&QSpinBox::valueChanged), this, &IncidenceRecurrence::handleEndAfterOccurrencesChange);
connect(mUi->mFrequencyEdit, qOverload<int>(&QSpinBox::valueChanged), this, &IncidenceRecurrence::handleFrequencyChange);
// Check the dirty status when the user changes values.
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mUi->mRecurrenceTypeCombo, qOverload<int>(&QComboBox::currentIndexChanged), this, &IncidenceRecurrence::checkDirtyStatus);
#else
connect(mUi->mRecurrenceTypeCombo, qOverload<int, const QString &>(&QComboBox::currentIndexChanged), this, &IncidenceRecurrence::checkDirtyStatus);
#endif
connect(mUi->mFrequencyEdit, qOverload<int>(&QSpinBox::valueChanged), this, &IncidenceRecurrence::checkDirtyStatus);
connect(mUi->mFrequencyEdit, qOverload<int>(&QSpinBox::valueChanged), this, &IncidenceRecurrence::checkDirtyStatus);
connect(mUi->mWeekDayCombo, &KPIM::KWeekdayCheckCombo::checkedItemsChanged, this,
&IncidenceRecurrence::checkDirtyStatus);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mUi->mMonthlyCombo, qOverload<int>(&QComboBox::currentIndexChanged), this, &IncidenceRecurrence::checkDirtyStatus);
#else
connect(mUi->mMonthlyCombo, qOverload<int, const QString &>(&QComboBox::currentIndexChanged), this, &IncidenceRecurrence::checkDirtyStatus);
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mUi->mYearlyCombo, qOverload<int>(&QComboBox::currentIndexChanged), this, &IncidenceRecurrence::checkDirtyStatus);
#else
connect(mUi->mYearlyCombo, qOverload<int, const QString &>(&QComboBox::currentIndexChanged), this, &IncidenceRecurrence::checkDirtyStatus);
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mUi->mRecurrenceEndCombo, qOverload<int>(&QComboBox::currentIndexChanged), this, &IncidenceRecurrence::checkDirtyStatus);
#else
connect(mUi->mRecurrenceEndCombo, qOverload<int, const QString &>(&QComboBox::currentIndexChanged), this, &IncidenceRecurrence::checkDirtyStatus);
#endif
connect(mUi->mEndDurationEdit, qOverload<int>(&QSpinBox::valueChanged), this, &IncidenceRecurrence::checkDirtyStatus);
connect(mUi->mRecurrenceEndDate, &KDateComboBox::dateChanged, this,
&IncidenceRecurrence::checkDirtyStatus);
......
......@@ -30,7 +30,11 @@ IncidenceSecrecy::IncidenceSecrecy(Ui::EventOrTodoDesktop *ui)
{
setObjectName(QStringLiteral("IncidenceSecrecy"));
mUi->mSecrecyCombo->addItems(KCalUtils::Stringify::incidenceSecrecyList());
connect(mUi->mSecrecyCombo, qOverload< int>(&QComboBox::currentIndexChanged), this, &IncidenceSecrecy::checkDirtyStatus);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mUi->mSecrecyCombo, qOverload<int>(&QComboBox::currentIndexChanged), this, &IncidenceSecrecy::checkDirtyStatus);
#else
connect(mUi->mSecrecyCombo, qOverload<int, const QString &>(&QComboBox::currentIndexChanged), this, &IncidenceSecrecy::checkDirtyStatus);
#endif
}
void IncidenceSecrecy::load(const KCalendarCore::Incidence::Ptr &incidence)
......
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