From c036d97d35d25c4511d9569d40c1de07dab96bb6 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 7 Aug 2015 17:06:29 +0900 Subject: 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 --- kalarm/karecurrence.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'kalarm/karecurrence.cpp') diff --git a/kalarm/karecurrence.cpp b/kalarm/karecurrence.cpp index 8b7e9068..b6051ca3 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; -- cgit v1.2.3