Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KAlarm
Commits
cc14531a
Commit
cc14531a
authored
Oct 14, 2020
by
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
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/alarmtimewidget.cpp
View file @
cc14531a
...
...
@@ -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
);
...
...
src/editdlg.cpp
View file @
cc14531a
...
...
@@ -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
);
...
...
src/lib/timeedit.cpp
View file @
cc14531a
/*
* timeedit.cpp - time-of-day edit widget, with AM/PM shown depending on locale
* Program: kalarm
* SPDX-FileCopyrightText: 2001-20
19
David Jarvie <djarvie@kde.org>
* SPDX-FileCopyrightText: 2001-20
20
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
);
}
}
...
...
src/lib/timeperiod.cpp
View file @
cc14531a
/*
* timeperiod.h - time period data entry widget
* Program: kalarm
* SPDX-FileCopyrightText: 2003-20
05, 2007, 2008, 201
0 David Jarvie <djarvie@kde.org>
* SPDX-FileCopyrightText: 2003-20
2
0 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
);
...
...
src/lib/timespinbox.cpp
View file @
cc14531a
/*
* timespinbox.cpp - time spinbox widget
* Program: kalarm
* SPDX-FileCopyrightText: 2001-20
19
David Jarvie <djarvie@kde.org>
* SPDX-FileCopyrightText: 2001-20
20
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
);
}
/******************************************************************************
...
...
src/recurrenceedit.cpp
View file @
cc14531a
...
...
@@ -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
);
...
...
src/repetitionbutton.cpp
View file @
cc14531a
/*
* repetitionbutton.cpp - pushbutton and dialog to specify alarm repetition
* Program: kalarm
* SPDX-FileCopyrightText: 2004-20
19
David Jarvie <djarvie@kde.org>
* SPDX-FileCopyrightText: 2004-20
20
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
);
...
...
src/resourceselector.cpp
View file @
cc14531a
...
...
@@ -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
);
...
...
src/sounddlg.cpp
View file @
cc14531a
...
...
@@ -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
());
...
...
src/soundpicker.cpp
View file @
cc14531a
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment