-rw-r--r-- | libopie/pim/oevent.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libopie/pim/oevent.cpp b/libopie/pim/oevent.cpp index 71b9441..aaae3b2 100644 --- a/libopie/pim/oevent.cpp +++ b/libopie/pim/oevent.cpp @@ -10,6 +10,5 @@ #include "oevent.h" -namespace OCalendarHelper { - static int week( const QDate& date) { +int OCalendarHelper::week( const QDate& date) { // Calculates the week this date is in within that // month. Equals the "row" is is in in the month view @@ -23,10 +22,10 @@ namespace OCalendarHelper { return week; } - static int occurence( const QDate& date) { +int OCalendarHelper::ocurrence( const QDate& date) { // calculates the number of occurrances of this day of the // week till the given date (e.g 3rd Wednesday of the month) return ( date.day() - 1 ) / 7 + 1; } - static int dayOfWeek( char day ) { +int OCalendarHelper::dayOfWeek( char day ) { int dayOfWeek = 1; char i = ORecur::MON; @@ -37,9 +36,8 @@ namespace OCalendarHelper { return dayOfWeek; } - static int monthDiff( const QDate& first, const QDate& second ) { +int OCalendarHelper::monthDiff( const QDate& first, const QDate& second ) { return ( second.year() - first.year() ) * 12 + second.month() - first.month(); } -} struct OEvent::Data : public QShared { @@ -131,5 +129,6 @@ void OEvent::setRecurrence( const ORecur& rec) { } bool OEvent::hasRecurrence()const { - return data->recur; + if (!data->recur ) return false; + return data->recur->doesRecur(); } QString OEvent::note()const { |