diff options
author | Michele Calgaro <[email protected]> | 2015-08-07 17:06:29 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2015-08-07 17:06:29 +0900 |
commit | c036d97d35d25c4511d9569d40c1de07dab96bb6 (patch) | |
tree | abb9a42ff29a9c144450b6b6a5aafb851cbdc69c /kalarm/karecurrence.cpp | |
parent | 74a91e13153f0696bb62baa78dac119f3a2e9fca (diff) | |
download | tdepim-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/karecurrence.cpp')
-rw-r--r-- | kalarm/karecurrence.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kalarm/karecurrence.cpp b/kalarm/karecurrence.cpp index 8b7e9068f..b6051ca3c 100644 --- a/kalarm/karecurrence.cpp +++ b/kalarm/karecurrence.cpp @@ -110,8 +110,8 @@ bool KARecurrence::init(RecurrenceRule::PeriodType recurType, int freq, int coun if (count < -1) return false; bool dateOnly = start.isDateOnly(); - if (!count && (!dateOnly && !end.isValid() - || dateOnly && !end.date().isValid())) + if (!count && ((!dateOnly && !end.isValid()) + || (dateOnly && !end.date().isValid()))) return false; switch (recurType) { @@ -134,8 +134,8 @@ bool KARecurrence::init(RecurrenceRule::PeriodType recurType, int freq, int coun else setEndDateTime(end); TQDateTime startdt = start.dateTime(); - if (recurType == RecurrenceRule::rYearly - && feb29Type == FEB29_FEB28 || feb29Type == FEB29_MAR1) + if ((recurType == RecurrenceRule::rYearly + && feb29Type == FEB29_FEB28) || feb29Type == FEB29_MAR1) { int year = startdt.date().year(); if (!TQDate::leapYear(year) @@ -257,7 +257,7 @@ void KARecurrence::fix() { // This is the second rule. // Ensure that it can be combined with the first one. - if (day == days[0] || day == -1 && days[0] == 60 + if (day == days[0] || (day == -1 && days[0] == 60) || rrule->frequency() != rrules[0]->frequency() || rrule->startDt() != rrules[0]->startDt()) break; |