author | mickeyl <mickeyl> | 2003-12-08 15:56:09 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-12-08 15:56:09 (UTC) |
commit | 466d396717be9ec10bdc1472bce5e733cd268ce4 (patch) (unidiff) | |
tree | 29490045306e1241ba315d789cfb6632e20587dd | |
parent | 8753d6a11a4e837df09f4fb2474cfae84d28320a (diff) | |
download | opie-466d396717be9ec10bdc1472bce5e733cd268ce4.zip opie-466d396717be9ec10bdc1472bce5e733cd268ce4.tar.gz opie-466d396717be9ec10bdc1472bce5e733cd268ce4.tar.bz2 |
work around sucky gcc2, which doesn't understand when the two arguments
for ? need an implicit type conversion
-rw-r--r-- | libopie/pim/oevent.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiepim/oevent.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libopie/pim/oevent.cpp b/libopie/pim/oevent.cpp index c916297..ec05e77 100644 --- a/libopie/pim/oevent.cpp +++ b/libopie/pim/oevent.cpp | |||
@@ -349,65 +349,65 @@ void OEvent::changeOrModify() { | |||
349 | } | 349 | } |
350 | 350 | ||
351 | data = d2; | 351 | data = d2; |
352 | } | 352 | } |
353 | } | 353 | } |
354 | void OEvent::deref() { | 354 | void OEvent::deref() { |
355 | if ( data->deref() ) { | 355 | if ( data->deref() ) { |
356 | delete data; | 356 | delete data; |
357 | data = 0; | 357 | data = 0; |
358 | } | 358 | } |
359 | } | 359 | } |
360 | // Exporting Event data to map. Using the same | 360 | // Exporting Event data to map. Using the same |
361 | // encoding as ODateBookAccessBackend_xml does.. | 361 | // encoding as ODateBookAccessBackend_xml does.. |
362 | // Thus, we could remove the stuff there and use this | 362 | // Thus, we could remove the stuff there and use this |
363 | // for it and for all other places.. | 363 | // for it and for all other places.. |
364 | // Encoding should happen at one place, only ! (eilers) | 364 | // Encoding should happen at one place, only ! (eilers) |
365 | QMap<int, QString> OEvent::toMap()const { | 365 | QMap<int, QString> OEvent::toMap()const { |
366 | QMap<int, QString> retMap; | 366 | QMap<int, QString> retMap; |
367 | 367 | ||
368 | retMap.insert( OEvent::FUid, QString::number( uid() ) ); | 368 | retMap.insert( OEvent::FUid, QString::number( uid() ) ); |
369 | retMap.insert( OEvent::FCategories, Qtopia::escapeString( Qtopia::Record::idsToString( categories() ) )); | 369 | retMap.insert( OEvent::FCategories, Qtopia::escapeString( Qtopia::Record::idsToString( categories() ) )); |
370 | retMap.insert( OEvent::FDescription, Qtopia::escapeString( description() ) ); | 370 | retMap.insert( OEvent::FDescription, Qtopia::escapeString( description() ) ); |
371 | retMap.insert( OEvent::FLocation, Qtopia::escapeString( location() ) ); | 371 | retMap.insert( OEvent::FLocation, Qtopia::escapeString( location() ) ); |
372 | retMap.insert( OEvent::FType, isAllDay() ? "AllDay" : "" ); | 372 | retMap.insert( OEvent::FType, isAllDay() ? "AllDay" : "" ); |
373 | OPimAlarm alarm = notifiers().alarms()[0]; | 373 | OPimAlarm alarm = notifiers().alarms()[0]; |
374 | retMap.insert( OEvent::FAlarm, QString::number( alarm.dateTime().secsTo( startDateTime() ) / 60 ) ); | 374 | retMap.insert( OEvent::FAlarm, QString::number( alarm.dateTime().secsTo( startDateTime() ) / 60 ) ); |
375 | retMap.insert( OEvent::FSound, (alarm.sound() == OPimAlarm::Loud) ? "loud" : "silent" ); | 375 | retMap.insert( OEvent::FSound, (alarm.sound() == OPimAlarm::Loud) ? "loud" : "silent" ); |
376 | 376 | ||
377 | OTimeZone zone( timeZone().isEmpty() ? OTimeZone::current() : timeZone() ); | 377 | OTimeZone zone( timeZone().isEmpty() ? OTimeZone::current() : timeZone() ); |
378 | retMap.insert( OEvent::FStart, QString::number( zone.fromUTCDateTime( zone.toDateTime( startDateTime(), OTimeZone::utc() ) ) ) ); | 378 | retMap.insert( OEvent::FStart, QString::number( zone.fromUTCDateTime( zone.toDateTime( startDateTime(), OTimeZone::utc() ) ) ) ); |
379 | retMap.insert( OEvent::FEnd, QString::number( zone.fromUTCDateTime( zone.toDateTime( endDateTime(), OTimeZone::utc() ) ) ) ); | 379 | retMap.insert( OEvent::FEnd, QString::number( zone.fromUTCDateTime( zone.toDateTime( endDateTime(), OTimeZone::utc() ) ) ) ); |
380 | retMap.insert( OEvent::FNote, Qtopia::escapeString( note() ) ); | 380 | retMap.insert( OEvent::FNote, Qtopia::escapeString( note() ) ); |
381 | retMap.insert( OEvent::FTimeZone, timeZone().isEmpty() ? "None" : timeZone() ); | 381 | retMap.insert( OEvent::FTimeZone, timeZone().isEmpty() ? QString( "None" ) : timeZone() ); |
382 | if( parent() ) | 382 | if( parent() ) |
383 | retMap.insert( OEvent::FRecParent, QString::number( parent() ) ); | 383 | retMap.insert( OEvent::FRecParent, QString::number( parent() ) ); |
384 | if( children().count() ){ | 384 | if( children().count() ){ |
385 | QArray<int> childr = children(); | 385 | QArray<int> childr = children(); |
386 | QString buf; | 386 | QString buf; |
387 | for ( uint i = 0; i < childr.count(); i++ ) { | 387 | for ( uint i = 0; i < childr.count(); i++ ) { |
388 | if ( i != 0 ) buf += " "; | 388 | if ( i != 0 ) buf += " "; |
389 | buf += QString::number( childr[i] ); | 389 | buf += QString::number( childr[i] ); |
390 | } | 390 | } |
391 | retMap.insert( OEvent::FRecChildren, buf ); | 391 | retMap.insert( OEvent::FRecChildren, buf ); |
392 | } | 392 | } |
393 | 393 | ||
394 | // Add recurrence stuff | 394 | // Add recurrence stuff |
395 | if( hasRecurrence() ){ | 395 | if( hasRecurrence() ){ |
396 | ORecur recur = recurrence(); | 396 | ORecur recur = recurrence(); |
397 | QMap<int, QString> recFields = recur.toMap(); | 397 | QMap<int, QString> recFields = recur.toMap(); |
398 | retMap.insert( OEvent::FRType, recFields[ORecur::RType] ); | 398 | retMap.insert( OEvent::FRType, recFields[ORecur::RType] ); |
399 | retMap.insert( OEvent::FRWeekdays, recFields[ORecur::RWeekdays] ); | 399 | retMap.insert( OEvent::FRWeekdays, recFields[ORecur::RWeekdays] ); |
400 | retMap.insert( OEvent::FRPosition, recFields[ORecur::RPosition] ); | 400 | retMap.insert( OEvent::FRPosition, recFields[ORecur::RPosition] ); |
401 | retMap.insert( OEvent::FRFreq, recFields[ORecur::RFreq] ); | 401 | retMap.insert( OEvent::FRFreq, recFields[ORecur::RFreq] ); |
402 | retMap.insert( OEvent::FRHasEndDate, recFields[ORecur::RHasEndDate] ); | 402 | retMap.insert( OEvent::FRHasEndDate, recFields[ORecur::RHasEndDate] ); |
403 | retMap.insert( OEvent::FREndDate, recFields[ORecur::EndDate] ); | 403 | retMap.insert( OEvent::FREndDate, recFields[ORecur::EndDate] ); |
404 | retMap.insert( OEvent::FRCreated, recFields[ORecur::Created] ); | 404 | retMap.insert( OEvent::FRCreated, recFields[ORecur::Created] ); |
405 | retMap.insert( OEvent::FRExceptions, recFields[ORecur::Exceptions] ); | 405 | retMap.insert( OEvent::FRExceptions, recFields[ORecur::Exceptions] ); |
406 | } | 406 | } |
407 | 407 | ||
408 | return retMap; | 408 | return retMap; |
409 | } | 409 | } |
410 | 410 | ||
411 | void OEvent::fromMap( const QMap<int, QString>& map ) | 411 | void OEvent::fromMap( const QMap<int, QString>& map ) |
412 | { | 412 | { |
413 | 413 | ||
diff --git a/libopie2/opiepim/oevent.cpp b/libopie2/opiepim/oevent.cpp index c916297..ec05e77 100644 --- a/libopie2/opiepim/oevent.cpp +++ b/libopie2/opiepim/oevent.cpp | |||
@@ -349,65 +349,65 @@ void OEvent::changeOrModify() { | |||
349 | } | 349 | } |
350 | 350 | ||
351 | data = d2; | 351 | data = d2; |
352 | } | 352 | } |
353 | } | 353 | } |
354 | void OEvent::deref() { | 354 | void OEvent::deref() { |
355 | if ( data->deref() ) { | 355 | if ( data->deref() ) { |
356 | delete data; | 356 | delete data; |
357 | data = 0; | 357 | data = 0; |
358 | } | 358 | } |
359 | } | 359 | } |
360 | // Exporting Event data to map. Using the same | 360 | // Exporting Event data to map. Using the same |
361 | // encoding as ODateBookAccessBackend_xml does.. | 361 | // encoding as ODateBookAccessBackend_xml does.. |
362 | // Thus, we could remove the stuff there and use this | 362 | // Thus, we could remove the stuff there and use this |
363 | // for it and for all other places.. | 363 | // for it and for all other places.. |
364 | // Encoding should happen at one place, only ! (eilers) | 364 | // Encoding should happen at one place, only ! (eilers) |
365 | QMap<int, QString> OEvent::toMap()const { | 365 | QMap<int, QString> OEvent::toMap()const { |
366 | QMap<int, QString> retMap; | 366 | QMap<int, QString> retMap; |
367 | 367 | ||
368 | retMap.insert( OEvent::FUid, QString::number( uid() ) ); | 368 | retMap.insert( OEvent::FUid, QString::number( uid() ) ); |
369 | retMap.insert( OEvent::FCategories, Qtopia::escapeString( Qtopia::Record::idsToString( categories() ) )); | 369 | retMap.insert( OEvent::FCategories, Qtopia::escapeString( Qtopia::Record::idsToString( categories() ) )); |
370 | retMap.insert( OEvent::FDescription, Qtopia::escapeString( description() ) ); | 370 | retMap.insert( OEvent::FDescription, Qtopia::escapeString( description() ) ); |
371 | retMap.insert( OEvent::FLocation, Qtopia::escapeString( location() ) ); | 371 | retMap.insert( OEvent::FLocation, Qtopia::escapeString( location() ) ); |
372 | retMap.insert( OEvent::FType, isAllDay() ? "AllDay" : "" ); | 372 | retMap.insert( OEvent::FType, isAllDay() ? "AllDay" : "" ); |
373 | OPimAlarm alarm = notifiers().alarms()[0]; | 373 | OPimAlarm alarm = notifiers().alarms()[0]; |
374 | retMap.insert( OEvent::FAlarm, QString::number( alarm.dateTime().secsTo( startDateTime() ) / 60 ) ); | 374 | retMap.insert( OEvent::FAlarm, QString::number( alarm.dateTime().secsTo( startDateTime() ) / 60 ) ); |
375 | retMap.insert( OEvent::FSound, (alarm.sound() == OPimAlarm::Loud) ? "loud" : "silent" ); | 375 | retMap.insert( OEvent::FSound, (alarm.sound() == OPimAlarm::Loud) ? "loud" : "silent" ); |
376 | 376 | ||
377 | OTimeZone zone( timeZone().isEmpty() ? OTimeZone::current() : timeZone() ); | 377 | OTimeZone zone( timeZone().isEmpty() ? OTimeZone::current() : timeZone() ); |
378 | retMap.insert( OEvent::FStart, QString::number( zone.fromUTCDateTime( zone.toDateTime( startDateTime(), OTimeZone::utc() ) ) ) ); | 378 | retMap.insert( OEvent::FStart, QString::number( zone.fromUTCDateTime( zone.toDateTime( startDateTime(), OTimeZone::utc() ) ) ) ); |
379 | retMap.insert( OEvent::FEnd, QString::number( zone.fromUTCDateTime( zone.toDateTime( endDateTime(), OTimeZone::utc() ) ) ) ); | 379 | retMap.insert( OEvent::FEnd, QString::number( zone.fromUTCDateTime( zone.toDateTime( endDateTime(), OTimeZone::utc() ) ) ) ); |
380 | retMap.insert( OEvent::FNote, Qtopia::escapeString( note() ) ); | 380 | retMap.insert( OEvent::FNote, Qtopia::escapeString( note() ) ); |
381 | retMap.insert( OEvent::FTimeZone, timeZone().isEmpty() ? "None" : timeZone() ); | 381 | retMap.insert( OEvent::FTimeZone, timeZone().isEmpty() ? QString( "None" ) : timeZone() ); |
382 | if( parent() ) | 382 | if( parent() ) |
383 | retMap.insert( OEvent::FRecParent, QString::number( parent() ) ); | 383 | retMap.insert( OEvent::FRecParent, QString::number( parent() ) ); |
384 | if( children().count() ){ | 384 | if( children().count() ){ |
385 | QArray<int> childr = children(); | 385 | QArray<int> childr = children(); |
386 | QString buf; | 386 | QString buf; |
387 | for ( uint i = 0; i < childr.count(); i++ ) { | 387 | for ( uint i = 0; i < childr.count(); i++ ) { |
388 | if ( i != 0 ) buf += " "; | 388 | if ( i != 0 ) buf += " "; |
389 | buf += QString::number( childr[i] ); | 389 | buf += QString::number( childr[i] ); |
390 | } | 390 | } |
391 | retMap.insert( OEvent::FRecChildren, buf ); | 391 | retMap.insert( OEvent::FRecChildren, buf ); |
392 | } | 392 | } |
393 | 393 | ||
394 | // Add recurrence stuff | 394 | // Add recurrence stuff |
395 | if( hasRecurrence() ){ | 395 | if( hasRecurrence() ){ |
396 | ORecur recur = recurrence(); | 396 | ORecur recur = recurrence(); |
397 | QMap<int, QString> recFields = recur.toMap(); | 397 | QMap<int, QString> recFields = recur.toMap(); |
398 | retMap.insert( OEvent::FRType, recFields[ORecur::RType] ); | 398 | retMap.insert( OEvent::FRType, recFields[ORecur::RType] ); |
399 | retMap.insert( OEvent::FRWeekdays, recFields[ORecur::RWeekdays] ); | 399 | retMap.insert( OEvent::FRWeekdays, recFields[ORecur::RWeekdays] ); |
400 | retMap.insert( OEvent::FRPosition, recFields[ORecur::RPosition] ); | 400 | retMap.insert( OEvent::FRPosition, recFields[ORecur::RPosition] ); |
401 | retMap.insert( OEvent::FRFreq, recFields[ORecur::RFreq] ); | 401 | retMap.insert( OEvent::FRFreq, recFields[ORecur::RFreq] ); |
402 | retMap.insert( OEvent::FRHasEndDate, recFields[ORecur::RHasEndDate] ); | 402 | retMap.insert( OEvent::FRHasEndDate, recFields[ORecur::RHasEndDate] ); |
403 | retMap.insert( OEvent::FREndDate, recFields[ORecur::EndDate] ); | 403 | retMap.insert( OEvent::FREndDate, recFields[ORecur::EndDate] ); |
404 | retMap.insert( OEvent::FRCreated, recFields[ORecur::Created] ); | 404 | retMap.insert( OEvent::FRCreated, recFields[ORecur::Created] ); |
405 | retMap.insert( OEvent::FRExceptions, recFields[ORecur::Exceptions] ); | 405 | retMap.insert( OEvent::FRExceptions, recFields[ORecur::Exceptions] ); |
406 | } | 406 | } |
407 | 407 | ||
408 | return retMap; | 408 | return retMap; |
409 | } | 409 | } |
410 | 410 | ||
411 | void OEvent::fromMap( const QMap<int, QString>& map ) | 411 | void OEvent::fromMap( const QMap<int, QString>& map ) |
412 | { | 412 | { |
413 | 413 | ||