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
575e934a
Commit
575e934a
authored
Oct 22, 2014
by
David Jarvie
Browse files
Fix null dereference (Coverity 1167314)
parent
452a3f1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
kaevent.cpp
View file @
575e934a
...
...
@@ -329,7 +329,7 @@ class KAEventPrivate : public QSharedData
KDateTime
mAtLoginDateTime
;
// repeat-at-login end time
DateTime
mDeferralTime
;
// extra time to trigger alarm (if alarm or reminder deferred)
DateTime
mDisplayingTime
;
// date/time shown in the alarm currently being displayed
int
mDisplayingFlags
;
// type of alarm which is currently being displayed
int
mDisplayingFlags
;
// type of alarm which is currently being displayed
(for display alarm)
int
mReminderMinutes
;
// how long in advance reminder is to be, or 0 if none (<0 for reminder AFTER the alarm)
DateTime
mReminderAfterTime
;
// if mReminderActive true, time to trigger reminder AFTER the main alarm, or invalid if not pending
ReminderType
mReminderActive
;
// whether a reminder is due (before next, or after last, main alarm/recurrence)
...
...
@@ -612,7 +612,8 @@ KAEvent::KAEvent(const KDateTime& dt, const QString& message, const QColor& bg,
KAEventPrivate
::
KAEventPrivate
(
const
KDateTime
&
dt
,
const
QString
&
message
,
const
QColor
&
bg
,
const
QColor
&
fg
,
const
QFont
&
f
,
KAEvent
::
SubAction
action
,
int
lateCancel
,
KAEvent
::
Flags
flags
,
bool
changesPending
)
:
mRecurrence
(
0
)
:
mRevision
(
0
),
mRecurrence
(
0
)
{
set
(
dt
,
message
,
bg
,
fg
,
f
,
action
,
lateCancel
,
flags
,
changesPending
);
}
...
...
@@ -1184,11 +1185,11 @@ void KAEventPrivate::set(const Event* event)
{
// Convert a repetition with no recurrence into a recurrence
if
(
mRepetition
.
isDaily
())
recur
->
set
Daily
(
mRepetition
.
intervalDays
());
setRecur
(
RecurrenceRule
::
r
Daily
,
mRepetition
.
intervalDays
()
,
mRepetition
.
count
()
+
1
,
QDate
()
);
else
recur
->
setMinutely
(
mRepetition
.
intervalMinutes
());
recur
->
setDuration
(
mRepetition
.
count
()
+
1
);
setRecur
(
RecurrenceRule
::
rMinutely
,
mRepetition
.
intervalMinutes
(),
mRepetition
.
count
()
+
1
,
KDateTime
());
mRepetition
.
set
(
0
,
0
);
mTriggerChanged
=
true
;
}
if
(
mRepeatAtLogin
)
...
...
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