summaryrefslogtreecommitdiffabout
path: root/libkcal/incidencebase.cpp
Unidiff
Diffstat (limited to 'libkcal/incidencebase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/incidencebase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp
index 64a343c..b36dc1a 100644
--- a/libkcal/incidencebase.cpp
+++ b/libkcal/incidencebase.cpp
@@ -210,147 +210,147 @@ void IncidenceBase::setFloats(bool f)
210 if (mReadOnly) return; 210 if (mReadOnly) return;
211 mFloats = f; 211 mFloats = f;
212 updated(); 212 updated();
213} 213}
214 214
215 215
216void IncidenceBase::addAttendee(Attendee *a, bool doupdate) 216void IncidenceBase::addAttendee(Attendee *a, bool doupdate)
217{ 217{
218 if (mReadOnly) return; 218 if (mReadOnly) return;
219 if (a->name().left(7).upper() == "MAILTO:") 219 if (a->name().left(7).upper() == "MAILTO:")
220 a->setName(a->name().remove(0,7)); 220 a->setName(a->name().remove(0,7));
221 221
222 mAttendees.append(a); 222 mAttendees.append(a);
223 if (doupdate) updated(); 223 if (doupdate) updated();
224} 224}
225 225
226#if 0 226#if 0
227void IncidenceBase::removeAttendee(Attendee *a) 227void IncidenceBase::removeAttendee(Attendee *a)
228{ 228{
229 if (mReadOnly) return; 229 if (mReadOnly) return;
230 mAttendees.removeRef(a); 230 mAttendees.removeRef(a);
231 updated(); 231 updated();
232} 232}
233 233
234void IncidenceBase::removeAttendee(const char *n) 234void IncidenceBase::removeAttendee(const char *n)
235{ 235{
236 Attendee *a; 236 Attendee *a;
237 237
238 if (mReadOnly) return; 238 if (mReadOnly) return;
239 for (a = mAttendees.first(); a; a = mAttendees.next()) 239 for (a = mAttendees.first(); a; a = mAttendees.next())
240 if (a->getName() == n) { 240 if (a->getName() == n) {
241 mAttendees.remove(); 241 mAttendees.remove();
242 break; 242 break;
243 } 243 }
244} 244}
245#endif 245#endif
246 246
247void IncidenceBase::clearAttendees() 247void IncidenceBase::clearAttendees()
248{ 248{
249 if (mReadOnly) return; 249 if (mReadOnly) return;
250 mAttendees.clear(); 250 mAttendees.clear();
251} 251}
252 252
253#if 0 253#if 0
254Attendee *IncidenceBase::getAttendee(const char *n) const 254Attendee *IncidenceBase::getAttendee(const char *n) const
255{ 255{
256 QPtrListIterator<Attendee> qli(mAttendees); 256 QPtrListIterator<Attendee> qli(mAttendees);
257 257
258 qli.toFirst(); 258 qli.toFirst();
259 while (qli) { 259 while (qli) {
260 if (qli.current()->getName() == n) 260 if (qli.current()->getName() == n)
261 return qli.current(); 261 return qli.current();
262 ++qli; 262 ++qli;
263 } 263 }
264 return 0L; 264 return 0L;
265} 265}
266#endif 266#endif
267 267
268Attendee *IncidenceBase::attendeeByMail(const QString &email) 268Attendee *IncidenceBase::attendeeByMail(const QString &email)
269{ 269{
270 QPtrListIterator<Attendee> qli(mAttendees); 270 QPtrListIterator<Attendee> qli(mAttendees);
271 271
272 qli.toFirst(); 272 qli.toFirst();
273 while (qli) { 273 while (qli) {
274 if (qli.current()->email() == email) 274 if (qli.current()->email().lower() == email.lower())
275 return qli.current(); 275 return qli.current();
276 ++qli; 276 ++qli;
277 } 277 }
278 return 0L; 278 return 0L;
279} 279}
280 280
281Attendee *IncidenceBase::attendeeByMails(const QStringList &emails, const QString& email) 281Attendee *IncidenceBase::attendeeByMails(const QStringList &emails, const QString& email)
282{ 282{
283 QPtrListIterator<Attendee> qli(mAttendees); 283 QPtrListIterator<Attendee> qli(mAttendees);
284 284
285 QStringList mails = emails; 285 QStringList mails = emails;
286 if (!email.isEmpty()) { 286 if (!email.isEmpty()) {
287 mails.append(email); 287 mails.append(email);
288 } 288 }
289 qli.toFirst(); 289 qli.toFirst();
290 while (qli) { 290 while (qli) {
291 for ( QStringList::Iterator it = mails.begin(); it != mails.end(); ++it ) { 291 for ( QStringList::Iterator it = mails.begin(); it != mails.end(); ++it ) {
292 if (qli.current()->email() == *it) 292 if (qli.current()->email().lower() == (*it).lower())
293 return qli.current(); 293 return qli.current();
294 } 294 }
295 295
296 ++qli; 296 ++qli;
297 } 297 }
298 return 0L; 298 return 0L;
299} 299}
300 300
301void IncidenceBase::setDuration(int seconds) 301void IncidenceBase::setDuration(int seconds)
302{ 302{
303 mDuration = seconds; 303 mDuration = seconds;
304 setHasDuration(true); 304 setHasDuration(true);
305} 305}
306 306
307int IncidenceBase::duration() const 307int IncidenceBase::duration() const
308{ 308{
309 return mDuration; 309 return mDuration;
310} 310}
311 311
312void IncidenceBase::setHasDuration(bool b) 312void IncidenceBase::setHasDuration(bool b)
313{ 313{
314 mHasDuration = b; 314 mHasDuration = b;
315} 315}
316 316
317bool IncidenceBase::hasDuration() const 317bool IncidenceBase::hasDuration() const
318{ 318{
319 return mHasDuration; 319 return mHasDuration;
320} 320}
321 321
322void IncidenceBase::setSyncStatus(int stat) 322void IncidenceBase::setSyncStatus(int stat)
323{ 323{
324 if (mReadOnly) return; 324 if (mReadOnly) return;
325 mSyncStatus = stat; 325 mSyncStatus = stat;
326} 326}
327 327
328int IncidenceBase::syncStatus() const 328int IncidenceBase::syncStatus() const
329{ 329{
330 return mSyncStatus; 330 return mSyncStatus;
331} 331}
332 332
333void IncidenceBase::setPilotId( int id ) 333void IncidenceBase::setPilotId( int id )
334{ 334{
335 if (mReadOnly) return; 335 if (mReadOnly) return;
336 mPilotId = id; 336 mPilotId = id;
337} 337}
338 338
339int IncidenceBase::pilotId() const 339int IncidenceBase::pilotId() const
340{ 340{
341 return mPilotId; 341 return mPilotId;
342} 342}
343 343
344int IncidenceBase::tempSyncStat() const 344int IncidenceBase::tempSyncStat() const
345{ 345{
346 return mTempSyncStat; 346 return mTempSyncStat;
347} 347}
348void IncidenceBase::setTempSyncStat( int id ) 348void IncidenceBase::setTempSyncStat( int id )
349{ 349{
350 if (mReadOnly) return; 350 if (mReadOnly) return;
351 mTempSyncStat = id; 351 mTempSyncStat = id;
352} 352}
353 353
354void IncidenceBase::removeID(const QString &prof) 354void IncidenceBase::removeID(const QString &prof)
355{ 355{
356 mExternalId = KIdManager::removeId ( mExternalId, prof); 356 mExternalId = KIdManager::removeId ( mExternalId, prof);