author | zecke <zecke> | 2002-09-10 13:11:25 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-10 13:11:25 (UTC) |
commit | a73774e8ab1d14c76f17c854c6b6cdf801abfe82 (patch) (unidiff) | |
tree | 27b0ddb41a40133bfaad34781ce69890615e4acc | |
parent | 8064c0e86eed8a48c2c7745195bf991b1d83f504 (diff) | |
download | opie-a73774e8ab1d14c76f17c854c6b6cdf801abfe82.zip opie-a73774e8ab1d14c76f17c854c6b6cdf801abfe82.tar.gz opie-a73774e8ab1d14c76f17c854c6b6cdf801abfe82.tar.bz2 |
Fix inline for Event::start
-rw-r--r-- | library/backend/event.cpp | 9 | ||||
-rw-r--r-- | library/backend/event.h | 8 |
2 files changed, 11 insertions, 6 deletions
diff --git a/library/backend/event.cpp b/library/backend/event.cpp index 7110717..8f3f780 100644 --- a/library/backend/event.cpp +++ b/library/backend/event.cpp | |||
@@ -419,17 +419,17 @@ int Event::monthDiff( const QDate& first, const QDate& second ) | |||
419 | \internal | 419 | \internal |
420 | */ | 420 | */ |
421 | QMap<int, QString> Event::toMap() const | 421 | QMap<int, QString> Event::toMap() const |
422 | { | 422 | { |
423 | QMap<int, QString> m; | 423 | QMap<int, QString> m; |
424 | 424 | ||
425 | if ( !description().isEmpty() ) | 425 | if ( !description().isEmpty() ) |
426 | m.insert( DatebookDescription, description() ); | 426 | m.insert( DatebookDescription, description() ); |
427 | if ( !location().isEmpty() ) | 427 | if ( !location().isEmpty() ) |
428 | m.insert ( Location, location() ); | 428 | m.insert ( Location, location() ); |
429 | if ( categories().count() ) | 429 | if ( categories().count() ) |
430 | m.insert ( DatebookCategory, idsToString( categories() ) ); | 430 | m.insert ( DatebookCategory, idsToString( categories() ) ); |
431 | if ( !timeZone().isEmpty() ) | 431 | if ( !timeZone().isEmpty() ) |
432 | m.insert ( TimeZone, timeZone() ); | 432 | m.insert ( TimeZone, timeZone() ); |
433 | if ( !notes().isEmpty() ) | 433 | if ( !notes().isEmpty() ) |
434 | m.insert ( Note, notes() ); | 434 | m.insert ( Note, notes() ); |
435 | 435 | ||
@@ -580,32 +580,37 @@ const QString &Event::location() const | |||
580 | 580 | ||
581 | /*! | 581 | /*! |
582 | \internal | 582 | \internal |
583 | */ | 583 | */ |
584 | Event::Type Event::type() const | 584 | Event::Type Event::type() const |
585 | { | 585 | { |
586 | return typ; | 586 | return typ; |
587 | } | 587 | } |
588 | 588 | QDateTime Event::start() const { | |
589 | return start( TRUE ); | ||
590 | } | ||
589 | /*! | 591 | /*! |
590 | \internal | 592 | \internal |
591 | */ | 593 | */ |
592 | QDateTime Event::start( bool actual ) const | 594 | QDateTime Event::start( bool actual ) const |
593 | { | 595 | { |
594 | QDateTime dt = (startUTC > 0) ? TimeConversion::fromUTC( startUTC ) : QDateTime::currentDateTime(); | 596 | QDateTime dt = (startUTC > 0) ? TimeConversion::fromUTC( startUTC ) : QDateTime::currentDateTime(); |
595 | 597 | ||
596 | if ( actual && typ == AllDay ) { | 598 | if ( actual && typ == AllDay ) { |
597 | QTime t = dt.time(); | 599 | QTime t = dt.time(); |
598 | t.setHMS( 0, 0, 0 ); | 600 | t.setHMS( 0, 0, 0 ); |
599 | dt.setTime( t ); | 601 | dt.setTime( t ); |
600 | } | 602 | } |
601 | return dt; | 603 | return dt; |
602 | } | 604 | } |
603 | 605 | ||
606 | QDateTime Event::end() const { | ||
607 | return end( TRUE ); | ||
608 | } | ||
604 | /*! | 609 | /*! |
605 | \internal | 610 | \internal |
606 | */ | 611 | */ |
607 | QDateTime Event::end( bool actual ) const | 612 | QDateTime Event::end( bool actual ) const |
608 | { | 613 | { |
609 | QDateTime dt = (endUTC > 0) ? TimeConversion::fromUTC( endUTC ) : QDateTime::currentDateTime(); | 614 | QDateTime dt = (endUTC > 0) ? TimeConversion::fromUTC( endUTC ) : QDateTime::currentDateTime(); |
610 | 615 | ||
611 | if ( actual && typ == AllDay ) { | 616 | if ( actual && typ == AllDay ) { |
diff --git a/library/backend/event.h b/library/backend/event.h index 7fe41a5..2b275a4 100644 --- a/library/backend/event.h +++ b/library/backend/event.h | |||
@@ -263,19 +263,19 @@ inline int Event::alarmDelay() const | |||
263 | { | 263 | { |
264 | return alarmTime(); | 264 | return alarmTime(); |
265 | } | 265 | } |
266 | 266 | ||
267 | inline void Event::setAllDay(bool enable) | 267 | inline void Event::setAllDay(bool enable) |
268 | { | 268 | { |
269 | if (enable) | 269 | if (enable) |
270 | setType(AllDay); | 270 | setType(AllDay); |
271 | else | 271 | else |
272 | setType(Normal); | 272 | setType(Normal); |
273 | }; | 273 | }; |
274 | 274 | ||
275 | inline bool Event::isAllDay() const | 275 | inline bool Event::isAllDay() const |
276 | { | 276 | { |
277 | return type() == AllDay; | 277 | return type() == AllDay; |
278 | } | 278 | } |
279 | 279 | ||
280 | inline Event::RepeatType Event::repeatType() const | 280 | inline Event::RepeatType Event::repeatType() const |
281 | { | 281 | { |
@@ -336,27 +336,27 @@ inline bool Event::repeatOnWeekDay(int day) const | |||
336 | return ( (1 << (day - 1)) & pattern.days ) != 0; | 336 | return ( (1 << (day - 1)) & pattern.days ) != 0; |
337 | } | 337 | } |
338 | 338 | ||
339 | inline void Event::setRepeatOnWeekDay(int day, bool enable) | 339 | inline void Event::setRepeatOnWeekDay(int day, bool enable) |
340 | { | 340 | { |
341 | if ( repeatOnWeekDay( day ) != enable ) | 341 | if ( repeatOnWeekDay( day ) != enable ) |
342 | pattern.days ^= 1 << (day - 1); | 342 | pattern.days ^= 1 << (day - 1); |
343 | } | 343 | } |
344 | 344 | /* | |
345 | inline QDateTime Event::start( ) const | 345 | inline QDateTime Event::start( ) const |
346 | { | 346 | { |
347 | return start(FALSE); | 347 | return start(FALSE); |
348 | } | 348 | } |
349 | 349 | ||
350 | inline QDateTime Event::end( ) const | 350 | inline QDateTime Event::end( ) const |
351 | { | 351 | { |
352 | return end(FALSE); | 352 | return end(FALSE); |
353 | } | 353 | } |
354 | 354 | */ | |
355 | #ifdef PALMTOPCENTER | 355 | #ifdef PALMTOPCENTER |
356 | class QPC_EXPORT EffectiveEventSizeSorter : public QSorter<EffectiveEvent> | 356 | class QPC_EXPORT EffectiveEventSizeSorter : public QSorter<EffectiveEvent> |
357 | { | 357 | { |
358 | public: | 358 | public: |
359 | int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const | 359 | int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const |
360 | { | 360 | { |
361 | return a.size() - b.size(); | 361 | return a.size() - b.size(); |
362 | } | 362 | } |