summaryrefslogtreecommitdiffstats
path: root/kalarm/alarmevent.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2015-08-07 17:06:29 +0900
committerMichele Calgaro <[email protected]>2015-08-07 17:06:29 +0900
commitc036d97d35d25c4511d9569d40c1de07dab96bb6 (patch)
treeabb9a42ff29a9c144450b6b6a5aafb851cbdc69c /kalarm/alarmevent.cpp
parent74a91e13153f0696bb62baa78dac119f3a2e9fca (diff)
downloadtdepim-c036d97d35d25c4511d9569d40c1de07dab96bb6.tar.gz
tdepim-c036d97d35d25c4511d9569d40c1de07dab96bb6.zip
Fixed KAlarm building warnings. Minor style patch up. Fixed possible error in treating deferred evens (see kalarm/alarmevent.cpp:1739).
Signed-off-by: Michele Calgaro <[email protected]>
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;