summaryrefslogtreecommitdiff
path: root/libopie2/opiepim
authorzecke <zecke>2004-10-17 18:38:39 (UTC)
committer zecke <zecke>2004-10-17 18:38:39 (UTC)
commite95fcb09fc069a83b3c10c19c081873daba49831 (patch) (unidiff)
tree13d13bac82d5bcf2489075e4f2962685ff3c897d /libopie2/opiepim
parent7e28835e246e06e157d760a40754b6257f2ad6b3 (diff)
downloadopie-e95fcb09fc069a83b3c10c19c081873daba49831.zip
opie-e95fcb09fc069a83b3c10c19c081873daba49831.tar.gz
opie-e95fcb09fc069a83b3c10c19c081873daba49831.tar.bz2
G++ 4.0 compiler fixes
-Remove anonymous structures and name them -Include 'card.h' to cardpile to make 'Card' known to QList so deleteItem will work -cast 'enum' to char in event.cpp and opimevent.cpp
Diffstat (limited to 'libopie2/opiepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimevent.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiepim/core/opimevent.cpp b/libopie2/opiepim/core/opimevent.cpp
index c656c3d..7bc6c32 100644
--- a/libopie2/opiepim/core/opimevent.cpp
+++ b/libopie2/opiepim/core/opimevent.cpp
@@ -49,49 +49,49 @@ int OCalendarHelper::week( const QDate& date )
49 // month. Equals the "row" is is in in the month view 49 // month. Equals the "row" is is in in the month view
50 int week = 1; 50 int week = 1;
51 QDate tmp( date.year(), date.month(), 1 ); 51 QDate tmp( date.year(), date.month(), 1 );
52 if ( date.dayOfWeek() < tmp.dayOfWeek() ) 52 if ( date.dayOfWeek() < tmp.dayOfWeek() )
53 ++week; 53 ++week;
54 54
55 week += ( date.day() - 1 ) / 7; 55 week += ( date.day() - 1 ) / 7;
56 56
57 return week; 57 return week;
58} 58}
59 59
60 60
61int OCalendarHelper::ocurrence( const QDate& date ) 61int OCalendarHelper::ocurrence( const QDate& date )
62{ 62{
63 // calculates the number of occurrances of this day of the 63 // calculates the number of occurrances of this day of the
64 // week till the given date (e.g 3rd Wednesday of the month) 64 // week till the given date (e.g 3rd Wednesday of the month)
65 return ( date.day() - 1 ) / 7 + 1; 65 return ( date.day() - 1 ) / 7 + 1;
66} 66}
67 67
68 68
69int OCalendarHelper::dayOfWeek( char day ) 69int OCalendarHelper::dayOfWeek( char day )
70{ 70{
71 int dayOfWeek = 1; 71 int dayOfWeek = 1;
72 char i = OPimRecurrence::MON; 72 char i = OPimRecurrence::MON;
73 while ( !( i & day ) && i <= OPimRecurrence::SUN ) 73 while ( !( i & day ) && i <= static_cast<char>(OPimRecurrence::SUN) )
74 { 74 {
75 i <<= 1; 75 i <<= 1;
76 ++dayOfWeek; 76 ++dayOfWeek;
77 } 77 }
78 return dayOfWeek; 78 return dayOfWeek;
79} 79}
80 80
81 81
82int OCalendarHelper::monthDiff( const QDate& first, const QDate& second ) 82int OCalendarHelper::monthDiff( const QDate& first, const QDate& second )
83{ 83{
84 return ( second.year() - first.year() ) * 12 + 84 return ( second.year() - first.year() ) * 12 +
85 second.month() - first.month(); 85 second.month() - first.month();
86} 86}
87 87
88 88
89struct OPimEvent::Data : public QShared 89struct OPimEvent::Data : public QShared
90{ 90{
91 Data() : QShared() 91 Data() : QShared()
92 { 92 {
93 child = 0; 93 child = 0;
94 recur = 0; 94 recur = 0;
95 manager = 0; 95 manager = 0;
96 isAllDay = false; 96 isAllDay = false;
97 parent = 0; 97 parent = 0;