author | zautrix <zautrix> | 2005-07-07 20:46:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-07 20:46:00 (UTC) |
commit | de5621f2fd3924f27c05459ae555b3bd06c5e584 (patch) (unidiff) | |
tree | 589d19415e3c0ff6c08cec375db145242581c143 /libkcal/incidencebase.cpp | |
parent | 766b53919de14b8faec22db32b6a750acde0b760 (diff) | |
download | kdepimpi-de5621f2fd3924f27c05459ae555b3bd06c5e584.zip kdepimpi-de5621f2fd3924f27c05459ae555b3bd06c5e584.tar.gz kdepimpi-de5621f2fd3924f27c05459ae555b3bd06c5e584.tar.bz2 |
fixxx
-rw-r--r-- | libkcal/incidencebase.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp index 96039df..dcead02 100644 --- a/libkcal/incidencebase.cpp +++ b/libkcal/incidencebase.cpp | |||
@@ -94,96 +94,104 @@ bool KCal::operator==( const IncidenceBase& i1, const IncidenceBase& i2 ) | |||
94 | Attendee * a1 = i1.attendees().first(), *a2 =i2.attendees().first() ; | 94 | Attendee * a1 = i1.attendees().first(), *a2 =i2.attendees().first() ; |
95 | while ( a1 ) { | 95 | while ( a1 ) { |
96 | if ( !( (*a1) == (*a2)) ) | 96 | if ( !( (*a1) == (*a2)) ) |
97 | { | 97 | { |
98 | //qDebug("Attendee not equal "); | 98 | //qDebug("Attendee not equal "); |
99 | return false; | 99 | return false; |
100 | } | 100 | } |
101 | a1 = i1.attendees().next(); | 101 | a1 = i1.attendees().next(); |
102 | a2 = i2.attendees().next(); | 102 | a2 = i2.attendees().next(); |
103 | } | 103 | } |
104 | } | 104 | } |
105 | //if ( i1.dtStart() != i2.dtStart() ) | 105 | //if ( i1.dtStart() != i2.dtStart() ) |
106 | // return false; | 106 | // return false; |
107 | #if 0 | 107 | #if 0 |
108 | qDebug("1 %d ",i1.doesFloat() == i2.doesFloat() ); | 108 | qDebug("1 %d ",i1.doesFloat() == i2.doesFloat() ); |
109 | qDebug("1 %d ",i1.duration() == i2.duration() ); | 109 | qDebug("1 %d ",i1.duration() == i2.duration() ); |
110 | qDebug("3 %d ",i1.hasDuration() == i2.hasDuration() ); | 110 | qDebug("3 %d ",i1.hasDuration() == i2.hasDuration() ); |
111 | qDebug("1 %d ",i1.pilotId() == i2.pilotId() ); | 111 | qDebug("1 %d ",i1.pilotId() == i2.pilotId() ); |
112 | qDebug("1 %d %d %d",i1.syncStatus() == i2.syncStatus() , i1.syncStatus(),i2.syncStatus() ); | 112 | qDebug("1 %d %d %d",i1.syncStatus() == i2.syncStatus() , i1.syncStatus(),i2.syncStatus() ); |
113 | qDebug("6 %d ",i1.organizer() == i2.organizer() ); | 113 | qDebug("6 %d ",i1.organizer() == i2.organizer() ); |
114 | 114 | ||
115 | #endif | 115 | #endif |
116 | if ( i1.hasDuration() == i2.hasDuration() ) { | 116 | if ( i1.hasDuration() == i2.hasDuration() ) { |
117 | if ( i1.hasDuration() ) { | 117 | if ( i1.hasDuration() ) { |
118 | if ( i1.duration() != i2.duration() ) | 118 | if ( i1.duration() != i2.duration() ) |
119 | return false; | 119 | return false; |
120 | } | 120 | } |
121 | } else { | 121 | } else { |
122 | return false; | 122 | return false; |
123 | } | 123 | } |
124 | 124 | ||
125 | return ( i1.organizer() == i2.organizer() && | 125 | return ( i1.organizer() == i2.organizer() && |
126 | // i1.uid() == i2.uid() && | 126 | // i1.uid() == i2.uid() && |
127 | // Don't compare lastModified, otherwise the operator is not | 127 | // Don't compare lastModified, otherwise the operator is not |
128 | // of much use. We are not comparing for identity, after all. | 128 | // of much use. We are not comparing for identity, after all. |
129 | i1.doesFloat() == i2.doesFloat() && | 129 | i1.doesFloat() == i2.doesFloat() && |
130 | i1.pilotId() == i2.pilotId() );// && i1.syncStatus() == i2.syncStatus() ); | 130 | i1.pilotId() == i2.pilotId() );// && i1.syncStatus() == i2.syncStatus() ); |
131 | // no need to compare mObserver | 131 | // no need to compare mObserver |
132 | } | 132 | } |
133 | 133 | ||
134 | 134 | ||
135 | QDateTime IncidenceBase::getEvenTime( QDateTime dt ) | 135 | QDateTime IncidenceBase::getEvenTime( QDateTime dt ) |
136 | { | 136 | { |
137 | QTime t = dt.time(); | 137 | QTime t = dt.time(); |
138 | dt.setTime( QTime (t.hour (), t.minute (), t.second () ) ); | 138 | dt.setTime( QTime (t.hour (), t.minute (), t.second () ) ); |
139 | return dt; | 139 | return dt; |
140 | } | 140 | } |
141 | 141 | ||
142 | bool IncidenceBase::isTagged() const | ||
143 | { | ||
144 | return mIsTagged; | ||
145 | } | ||
146 | void IncidenceBase::setTagged( bool b) | ||
147 | { | ||
148 | mIsTagged = b; | ||
149 | } | ||
142 | void IncidenceBase::setCalID( int id ) | 150 | void IncidenceBase::setCalID( int id ) |
143 | { | 151 | { |
144 | if ( mCalID > 0 ) | 152 | if ( mCalID > 0 ) |
145 | updated(); | 153 | updated(); |
146 | mCalID = id; | 154 | mCalID = id; |
147 | } | 155 | } |
148 | int IncidenceBase::calID() const | 156 | int IncidenceBase::calID() const |
149 | { | 157 | { |
150 | return mCalID; | 158 | return mCalID; |
151 | } | 159 | } |
152 | void IncidenceBase::setCalEnabled( bool b ) | 160 | void IncidenceBase::setCalEnabled( bool b ) |
153 | { | 161 | { |
154 | mCalEnabled = b; | 162 | mCalEnabled = b; |
155 | } | 163 | } |
156 | bool IncidenceBase::calEnabled() const | 164 | bool IncidenceBase::calEnabled() const |
157 | { | 165 | { |
158 | return mCalEnabled; | 166 | return mCalEnabled; |
159 | } | 167 | } |
160 | 168 | ||
161 | void IncidenceBase::setAlarmEnabled( bool b ) | 169 | void IncidenceBase::setAlarmEnabled( bool b ) |
162 | { | 170 | { |
163 | mAlarmEnabled = b; | 171 | mAlarmEnabled = b; |
164 | } | 172 | } |
165 | bool IncidenceBase::alarmEnabled() const | 173 | bool IncidenceBase::alarmEnabled() const |
166 | { | 174 | { |
167 | return mAlarmEnabled; | 175 | return mAlarmEnabled; |
168 | } | 176 | } |
169 | 177 | ||
170 | 178 | ||
171 | void IncidenceBase::setUid(const QString &uid) | 179 | void IncidenceBase::setUid(const QString &uid) |
172 | { | 180 | { |
173 | mUid = uid; | 181 | mUid = uid; |
174 | updated(); | 182 | updated(); |
175 | } | 183 | } |
176 | 184 | ||
177 | QString IncidenceBase::uid() const | 185 | QString IncidenceBase::uid() const |
178 | { | 186 | { |
179 | return mUid; | 187 | return mUid; |
180 | } | 188 | } |
181 | 189 | ||
182 | void IncidenceBase::setLastModified(const QDateTime &lm) | 190 | void IncidenceBase::setLastModified(const QDateTime &lm) |
183 | { | 191 | { |
184 | // DON'T! updated() because we call this from | 192 | // DON'T! updated() because we call this from |
185 | // Calendar::updateEvent(). | 193 | // Calendar::updateEvent(). |
186 | mLastModified = getEvenTime(lm); | 194 | mLastModified = getEvenTime(lm); |
187 | //qDebug("IncidenceBase::setLastModified %s ",lm.toString().latin1()); | 195 | //qDebug("IncidenceBase::setLastModified %s ",lm.toString().latin1()); |
188 | } | 196 | } |
189 | 197 | ||