summaryrefslogtreecommitdiffstats
path: root/kalarm/alarmevent.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2015-08-07 17:06:29 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2015-08-27 23:21:13 +0900
commitc822d344caac7367564ef929037082e3374267be (patch)
tree5be64ca958a093c3175888b4e15a22724fac4d39 /kalarm/alarmevent.cpp
parent3ba5901c39be9c956e74accdafe1a8b8b745e0e5 (diff)
downloadtdepim-c822d344caac7367564ef929037082e3374267be.tar.gz
tdepim-c822d344caac7367564ef929037082e3374267be.zip
Fixed KAlarm building warnings. Minor style patch up. Fixed possible error in treating deferred evens (see kalarm/alarmevent.cpp:1739).
(cherry picked from commit c036d97d35d25c4511d9569d40c1de07dab96bb6) Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kalarm/alarmevent.cpp')
-rw-r--r--kalarm/alarmevent.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/kalarm/alarmevent.cpp b/kalarm/alarmevent.cpp
index 87f300401..b5c4fb030 100644
--- a/kalarm/alarmevent.cpp
+++ b/kalarm/alarmevent.cpp
@@ -977,8 +977,8 @@ Event* KAEvent::event() const
*/
bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool cancelCancelledDefer) const
{
- if (checkUid && !mEventID.isEmpty() && mEventID != ev.uid()
- || !mAlarmCount && (!original || !mMainExpired))
+ if ((checkUid && !mEventID.isEmpty() && mEventID != ev.uid())
+ || (!mAlarmCount && (!original || !mMainExpired)))
return false;
checkRecur(); // ensure recurrence/repetition data is consistent
@@ -1089,7 +1089,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
}
// Add subsidiary alarms
- if (mRepeatAtLogin || mArchiveRepeatAtLogin && original)
+ if (mRepeatAtLogin || (mArchiveRepeatAtLogin && original))
{
DateTime dtl;
if (mArchiveRepeatAtLogin)
@@ -1107,7 +1107,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
ancillaryType = 1;
}
}
- if (mReminderMinutes || mArchiveReminderMinutes && original)
+ if (mReminderMinutes || (mArchiveReminderMinutes && original))
{
int minutes = mReminderMinutes ? mReminderMinutes : mArchiveReminderMinutes;
initKCalAlarm(ev, -minutes * 60, TQStringList(mReminderOnceOnly ? REMINDER_ONCE_TYPE : REMINDER_TYPE));
@@ -1117,7 +1117,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
ancillaryType = 2;
}
}
- if (mDeferral > 0 || mDeferral == CANCEL_DEFERRAL && !cancelCancelledDefer)
+ if (mDeferral > 0 || (mDeferral == CANCEL_DEFERRAL && !cancelCancelledDefer))
{
DateTime nextDateTime = mNextMainDateTime;
if (mMainExpired)
@@ -1736,7 +1736,7 @@ bool KAEvent::setDisplaying(const KAEvent& event, KAAlarm::Type alarmType, const
setUid(DISPLAYING);
mDisplaying = true;
mDisplayingTime = (alarmType == KAAlarm::AT_LOGIN_ALARM) ? repeatAtLoginTime : al.dateTime();
- switch (al.type())
+ switch (al.subType())
{
case KAAlarm::AT_LOGIN__ALARM: mDisplayingFlags = REPEAT_AT_LOGIN; break;
case KAAlarm::REMINDER__ALARM: mDisplayingFlags = REMINDER; break;