Skip to content
GitLab
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
56ea053c
Commit
56ea053c
authored
Oct 05, 2014
by
David Jarvie
Browse files
Remove C-style casts, reduce struct size
parent
8343246d
Changes
1
Hide whitespace changes
Inline
Side-by-side
kaevent.cpp
View file @
56ea053c
...
...
@@ -158,7 +158,6 @@ class KAEventPrivate : public QSharedData
const
Alarm
*
alarm
;
#endif
QString
cleanText
;
// text or audio file name
uint
emailFromId
;
QFont
font
;
QColor
bgColour
,
fgColour
;
float
soundVolume
;
...
...
@@ -166,11 +165,12 @@ class KAEventPrivate : public QSharedData
int
fadeSeconds
;
int
repeatSoundPause
;
int
nextRepeat
;
bool
speak
;
uint
emailFromId
;
KAEventPrivate
::
AlarmType
type
;
KAAlarm
::
Action
action
;
int
displayingFlags
;
KAEvent
::
ExtraActionOptions
extraActionOptions
;
bool
speak
;
bool
defaultFont
;
bool
isEmailText
;
bool
commandScript
;
...
...
@@ -261,13 +261,13 @@ class KAEventPrivate : public QSharedData
static
bool
convertRepetition
(
const
KCalCore
::
Event
::
Ptr
&
);
static
bool
convertStartOfDay
(
const
KCalCore
::
Event
::
Ptr
&
);
static
DateTime
readDateTime
(
const
KCalCore
::
Event
::
Ptr
&
,
bool
dateOnly
,
DateTime
&
start
);
static
void
readAlarms
(
const
KCalCore
::
Event
::
Ptr
&
,
void
*
a
larmMap
,
bool
cmdDisplay
=
false
);
static
void
readAlarms
(
const
KCalCore
::
Event
::
Ptr
&
,
A
larmMap
*
,
bool
cmdDisplay
=
false
);
static
void
readAlarm
(
const
KCalCore
::
Alarm
::
Ptr
&
,
AlarmData
&
,
bool
audioMain
,
bool
cmdDisplay
=
false
);
#else
static
bool
convertRepetition
(
KCal
::
Event
*
);
static
bool
convertStartOfDay
(
KCal
::
Event
*
);
static
DateTime
readDateTime
(
const
KCal
::
Event
*
,
bool
dateOnly
,
DateTime
&
start
);
static
void
readAlarms
(
const
KCal
::
Event
*
,
void
*
a
larmMap
,
bool
cmdDisplay
=
false
);
static
void
readAlarms
(
const
KCal
::
Event
*
,
A
larmMap
*
,
bool
cmdDisplay
=
false
);
static
void
readAlarm
(
const
KCal
::
Alarm
*
,
AlarmData
&
,
bool
audioMain
,
bool
cmdDisplay
=
false
);
#endif
...
...
@@ -1123,7 +1123,7 @@ void KAEventPrivate::set(const Event* event)
// alarm in the event (if it has expired and then been deferred)
if
(
!
set
)
{
mActionSubType
=
(
KAEvent
::
SubAction
)
data
.
action
;
mActionSubType
=
static_cast
<
KAEvent
::
SubAction
>
(
data
.
action
)
;
mText
=
(
mActionSubType
==
KAEvent
::
COMMAND
)
?
data
.
cleanText
.
trimmed
()
:
data
.
cleanText
;
switch
(
data
.
action
)
{
...
...
@@ -1249,7 +1249,7 @@ void KAEventPrivate::set(const KDateTime& dateTime, const QString& text, const Q
case
KAEvent
::
COMMAND
:
case
KAEvent
::
EMAIL
:
case
KAEvent
::
AUDIO
:
mActionSubType
=
(
KAEvent
::
SubAction
)
action
;
mActionSubType
=
static_cast
<
KAEvent
::
SubAction
>
(
action
)
;
break
;
default:
mActionSubType
=
KAEvent
::
MESSAGE
;
...
...
@@ -3801,7 +3801,7 @@ KAAlarm KAEventPrivate::alarm(KAAlarm::Type type) const
KAAlarm
::
Private
*
const
al_d
=
al
.
d
;
if
(
mAlarmCount
)
{
al_d
->
mActionType
=
(
KAAlarm
::
Action
)
mActionSubType
;
al_d
->
mActionType
=
static_cast
<
KAAlarm
::
Action
>
(
mActionSubType
)
;
al_d
->
mRepeatAtLogin
=
false
;
al_d
->
mDeferred
=
false
;
switch
(
type
)
...
...
@@ -4221,12 +4221,11 @@ DateTime KAEventPrivate::readDateTime(const Event* event, bool dateOnly, DateTim
* Reply = map of alarm data, indexed by KAAlarm::Type
*/
#ifndef KALARMCAL_USE_KRESOURCES
void
KAEventPrivate
::
readAlarms
(
const
Event
::
Ptr
&
event
,
void
*
alm
ap
,
bool
cmdDisplay
)
void
KAEventPrivate
::
readAlarms
(
const
Event
::
Ptr
&
event
,
AlarmMap
*
alarmM
ap
,
bool
cmdDisplay
)
#else
void
KAEventPrivate
::
readAlarms
(
const
Event
*
event
,
void
*
alm
ap
,
bool
cmdDisplay
)
void
KAEventPrivate
::
readAlarms
(
const
Event
*
event
,
AlarmMap
*
alarmM
ap
,
bool
cmdDisplay
)
#endif
{
AlarmMap
*
alarmMap
=
(
AlarmMap
*
)
almap
;
const
Alarm
::
List
alarms
=
event
->
alarms
();
// Check if it's an audio event with no display alarm
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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