Commit cc14531a authored by David Jarvie's avatar David Jarvie
Browse files

Remove static_cast from connect() for deprecated overloaded method params

parent 0ccde346
Pipeline #37676 passed with stage
in 29 minutes and 9 seconds
......@@ -146,7 +146,7 @@ void AlarmTimeWidget::init(Mode mode, const QString& title)
mDelayTimeEdit = new TimeSpinBox(1, maxDelayTime, topWidget);
mDelayTimeEdit->setValue(1439);
mDelayTimeEdit->setFixedSize(mDelayTimeEdit->sizeHint());
connect(mDelayTimeEdit, static_cast<void (TimeSpinBox::*)(int)>(&TimeSpinBox::valueChanged), this, &AlarmTimeWidget::delayTimeChanged);
connect(mDelayTimeEdit, &TimeSpinBox::valueChanged, this, &AlarmTimeWidget::delayTimeChanged);
mDelayTimeEdit->setWhatsThis(mDeferring ? xi18nc("@info:whatsthis", "<para>%1</para><para>%2</para>", i18n_TimeAfterPeriod(), TimeSpinBox::shiftWhatsThis())
: xi18nc("@info:whatsthis", "<para>%1</para><para>%2</para><para>%3</para>", i18n_TimeAfterPeriod(), recurText, TimeSpinBox::shiftWhatsThis()));
mAfterTimeRadio->setFocusWidget(mDelayTimeEdit);
......@@ -200,7 +200,7 @@ void AlarmTimeWidget::init(Mode mode, const QString& title)
mTimeZone = new TimeZoneCombo(mTimeZoneBox);
hlayout->addWidget(mTimeZone);
mTimeZone->setMaxVisibleItems(15);
connect(mTimeZone, static_cast<void (TimeZoneCombo::*)(int)>(&TimeZoneCombo::activated), this, &AlarmTimeWidget::slotTimeZoneChanged);
connect(mTimeZone, &TimeZoneCombo::activated, this, &AlarmTimeWidget::slotTimeZoneChanged);
mTimeZoneBox->setWhatsThis(i18nc("@info:whatsthis", "Select the time zone to use for this alarm."));
label->setBuddy(mTimeZone);
layout->addWidget(mTimeZoneBox);
......
......@@ -352,7 +352,7 @@ void EditAlarmDlg::init(const KAEvent* event)
mTemplateTimeAfter->setValue(1439);
mTemplateTimeAfter->setFixedSize(mTemplateTimeAfter->sizeHint());
mTemplateTimeAfter->setReadOnly(mReadOnly);
connect(mTemplateTimeAfter, static_cast<void (TimeSpinBox::*)(int)>(&TimeSpinBox::valueChanged), this, &EditAlarmDlg::contentsChanged);
connect(mTemplateTimeAfter, &TimeSpinBox::valueChanged, this, &EditAlarmDlg::contentsChanged);
mTemplateTimeAfter->setWhatsThis(xi18nc("@info:whatsthis", "<para>%1</para><para>%2</para>",
AlarmTimeWidget::i18n_TimeAfterPeriod(), TimeSpinBox::shiftWhatsThis()));
layout->addWidget(mTemplateTimeAfter);
......
/*
* timeedit.cpp - time-of-day edit widget, with AM/PM shown depending on locale
* Program: kalarm
* SPDX-FileCopyrightText: 2001-2019 David Jarvie <djarvie@kde.org>
* SPDX-FileCopyrightText: 2001-2020 David Jarvie <djarvie@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
......@@ -31,14 +31,14 @@ TimeEdit::TimeEdit(QWidget* parent)
bool use12hour = use12HourClock();
mSpinBox = new TimeSpinBox(!use12hour, this);
mSpinBox->setFixedSize(mSpinBox->sizeHint());
connect(mSpinBox, static_cast<void (TimeSpinBox::*)(int)>(&TimeSpinBox::valueChanged), this, &TimeEdit::slotValueChanged);
connect(mSpinBox, &TimeSpinBox::valueChanged, this, &TimeEdit::slotValueChanged);
layout->addWidget(mSpinBox);
if (use12hour)
{
mAmPm = new ComboBox(this);
setAmPmCombo(1, 1); // add "am" and "pm" options to the combo box
mAmPm->setFixedSize(mAmPm->sizeHint());
connect(mAmPm, static_cast<void (ComboBox::*)(int)>(&ComboBox::highlighted), this, &TimeEdit::slotAmPmChanged);
connect(mAmPm, &ComboBox::highlighted, this, &TimeEdit::slotAmPmChanged);
layout->addWidget(mAmPm);
}
}
......
/*
* timeperiod.h - time period data entry widget
* Program: kalarm
* SPDX-FileCopyrightText: 2003-2005, 2007, 2008, 2010 David Jarvie <djarvie@kde.org>
* SPDX-FileCopyrightText: 2003-2020 David Jarvie <djarvie@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
......@@ -46,12 +46,12 @@ TimePeriod::TimePeriod(bool allowHourMinute, QWidget* parent)
mSpinBox->setSingleStep(1);
mSpinBox->setSingleShiftStep(10);
mSpinBox->setRange(1, mMaxDays);
connect(mSpinBox, static_cast<void (SpinBox::*)(int)>(&SpinBox::valueChanged), this, &TimePeriod::slotDaysChanged);
connect(mSpinBox, &SpinBox::valueChanged, this, &TimePeriod::slotDaysChanged);
mSpinStack->addWidget(mSpinBox);
mTimeSpinBox = new TimeSpinBox(0, 99999, mSpinStack);
mTimeSpinBox->setRange(1, maxMinutes); // max 999H59M
connect(mTimeSpinBox, static_cast<void (TimeSpinBox::*)(int)>(&TimeSpinBox::valueChanged), this, &TimePeriod::slotTimeChanged);
connect(mTimeSpinBox, &TimeSpinBox::valueChanged, this, &TimePeriod::slotTimeChanged);
mSpinStack->addWidget(mTimeSpinBox);
mSpinStack->setFixedSize(mSpinBox->sizeHint().expandedTo(mTimeSpinBox->sizeHint()));
......@@ -73,7 +73,7 @@ TimePeriod::TimePeriod(bool allowHourMinute, QWidget* parent)
mUnitsCombo->addItem(i18n_weeks());
mMaxUnitShown = Weeks;
mUnitsCombo->setFixedSize(mUnitsCombo->sizeHint());
connect(mUnitsCombo, static_cast<void (ComboBox::*)(int)>(&ComboBox::activated), this, &TimePeriod::slotUnitsSelected);
connect(mUnitsCombo, &ComboBox::activated, this, &TimePeriod::slotUnitsSelected);
layout->addWidget(mUnitsCombo);
setFocusProxy(mUnitsCombo);
......
/*
* timespinbox.cpp - time spinbox widget
* Program: kalarm
* SPDX-FileCopyrightText: 2001-2019 David Jarvie <djarvie@kde.org>
* SPDX-FileCopyrightText: 2001-2020 David Jarvie <djarvie@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
......@@ -36,7 +36,7 @@ TimeSpinBox::TimeSpinBox(bool use24hour, QWidget* parent)
setShiftSteps(5, 360); // shift-left button increments 5 min / 6 hours
setSelectOnStep(false);
setAlignment(Qt::AlignHCenter);
connect(this, static_cast<void (TimeSpinBox::*)(int)>(&TimeSpinBox::valueChanged), this, &TimeSpinBox::slotValueChanged);
connect(this, &TimeSpinBox::valueChanged, this, &TimeSpinBox::slotValueChanged);
}
/******************************************************************************
......
......@@ -229,8 +229,8 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent)
mRepeatCountEntry->setSelectOnStep(false);
mRepeatCountEntry->setReadOnly(mReadOnly);
mRepeatCountEntry->setWhatsThis(i18nc("@info:whatsthis", "Enter the total number of times to trigger the alarm"));
connect(mRepeatCountEntry, static_cast<void (SpinBox::*)(int)>(&SpinBox::valueChanged), this, &RecurrenceEdit::repeatCountChanged);
connect(mRepeatCountEntry, static_cast<void (SpinBox::*)(int)>(&SpinBox::valueChanged), this, &RecurrenceEdit::contentsChanged);
connect(mRepeatCountEntry, &SpinBox::valueChanged, this, &RecurrenceEdit::repeatCountChanged);
connect(mRepeatCountEntry, &SpinBox::valueChanged, this, &RecurrenceEdit::contentsChanged);
mRepeatCountButton->setFocusWidget(mRepeatCountEntry);
mRepeatCountLabel = new QLabel(i18nc("@label", "occurrence(s)"), mRangeButtonBox);
mRepeatCountLabel->setFixedSize(mRepeatCountLabel->sizeHint());
......@@ -1336,7 +1336,7 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mDayCombo->setReadOnly(readOnly);
mDayCombo->setWhatsThis(i18nc("@info:whatsthis", "Select the day of the month on which to repeat the alarm"));
mDayButton->setFocusWidget(mDayCombo);
connect(mDayCombo, static_cast<void (ComboBox::*)(int)>(&ComboBox::activated), this, &MonthYearRule::slotDaySelected);
connect(mDayCombo, &ComboBox::activated, this, &MonthYearRule::slotDaySelected);
connect(mDayCombo, static_cast<void (ComboBox::*)(int)>(&ComboBox::currentIndexChanged), this, &MonthYearRule::changed);
boxLayout->addWidget(mDayCombo, 0, 1, 1, 2, Qt::AlignLeft);
......
/*
* repetitionbutton.cpp - pushbutton and dialog to specify alarm repetition
* Program: kalarm
* SPDX-FileCopyrightText: 2004-2019 David Jarvie <djarvie@kde.org>
* SPDX-FileCopyrightText: 2004-2020 David Jarvie <djarvie@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
......@@ -164,7 +164,7 @@ RepetitionDlg::RepetitionDlg(const QString& caption, bool readOnly, QWidget* par
mCount->setFixedSize(mCount->sizeHint());
mCount->setSingleShiftStep(10);
mCount->setSelectOnStep(false);
connect(mCount, static_cast<void (SpinBox::*)(int)>(&SpinBox::valueChanged), this, &RepetitionDlg::countChanged);
connect(mCount, &SpinBox::valueChanged, this, &RepetitionDlg::countChanged);
mCount->setWhatsThis(i18nc("@info:whatsthis", "Enter the number of times to trigger the alarm after its initial occurrence"));
layout->addWidget(mCount);
mCountButton->setFocusWidget(mCount);
......
......@@ -90,7 +90,7 @@ ResourceSelector::ResourceSelector(QWidget* parent)
connect(mEditButton, &QPushButton::clicked, this, &ResourceSelector::editResource);
connect(mDeleteButton, &QPushButton::clicked, this, &ResourceSelector::removeResource);
connect(mAlarmType, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, &ResourceSelector::alarmTypeSelected);
connect(mAlarmType, &QComboBox::activated, this, &ResourceSelector::alarmTypeSelected);
QTimer::singleShot(0, this, &ResourceSelector::alarmTypeSelected);
Preferences::connect(&Preferences::archivedKeepDaysChanged, this, &ResourceSelector::archiveDaysChanged);
......
......@@ -213,7 +213,7 @@ SoundWidget::SoundWidget(bool showPlay, bool showRepeat, QWidget* parent)
mRepeatPause->setSingleShiftStep(10);
mRepeatPause->setFixedSize(mRepeatPause->sizeHint());
label->setBuddy(mRepeatPause);
connect(mRepeatPause, static_cast<void (SpinBox::*)(int)>(&SpinBox::valueChanged), this, &SoundWidget::changed);
connect(mRepeatPause, &SpinBox::valueChanged, this, &SoundWidget::changed);
label = new QLabel(i18nc("@label", "seconds"), box);
boxHLayout->addWidget(label);
label->setFixedSize(label->sizeHint());
......@@ -270,7 +270,7 @@ SoundWidget::SoundWidget(bool showPlay, bool showRepeat, QWidget* parent)
mFadeTime->setSingleShiftStep(10);
mFadeTime->setFixedSize(mFadeTime->sizeHint());
label->setBuddy(mFadeTime);
connect(mFadeTime, static_cast<void (SpinBox::*)(int)>(&SpinBox::valueChanged), this, &SoundWidget::changed);
connect(mFadeTime, &SpinBox::valueChanged, this, &SoundWidget::changed);
label = new QLabel(i18nc("@label", "seconds"), mFadeBox);
boxHLayout->addWidget(label);
label->setFixedSize(label->sizeHint());
......
......@@ -67,7 +67,7 @@ SoundPicker::SoundPicker(QWidget* parent)
mFileShowing = true;
mSpeakShowing = !KPIMTextEdit::TextToSpeech::self()->isReady();
showSpeak(!mSpeakShowing); // index Speak (only displayed if appropriate)
connect(mTypeCombo, static_cast<void (ComboBox::*)(int)>(&ComboBox::activated), this, &SoundPicker::slotTypeSelected);
connect(mTypeCombo, &ComboBox::activated, this, &SoundPicker::slotTypeSelected);
connect(mTypeCombo, static_cast<void (ComboBox::*)(int)>(&ComboBox::currentIndexChanged), this, &SoundPicker::changed);
label->setBuddy(mTypeCombo);
soundLayout->addWidget(mTypeBox);
......
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