author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /libkcal/todo.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | libkcal/todo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index cc1c5ae..5a0c32e 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp | |||
@@ -610,33 +610,33 @@ QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_d | |||
610 | iscompleted = false; | 610 | iscompleted = false; |
611 | } | 611 | } |
612 | } | 612 | } |
613 | if ( iscompleted ) { | 613 | if ( iscompleted ) { |
614 | return QDateTime (); | 614 | return QDateTime (); |
615 | } | 615 | } |
616 | QDateTime incidenceStart; | 616 | QDateTime incidenceStart; |
617 | incidenceStart = dtDue(); | 617 | incidenceStart = dtDue(); |
618 | bool enabled = false; | 618 | bool enabled = false; |
619 | Alarm* alarm; | 619 | Alarm* alarm; |
620 | int off = 0; | 620 | int off = 0; |
621 | QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; | 621 | QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; |
622 | // if ( QDateTime::currentDateTime() > incidenceStart ){ | 622 | // if ( QDateTime::currentDateTime() > incidenceStart ){ |
623 | // *ok = false; | 623 | // *ok = false; |
624 | // return incidenceStart; | 624 | // return incidenceStart; |
625 | // } | 625 | // } |
626 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { | 626 | for (Q3PtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { |
627 | if (alarm->enabled()) { | 627 | if (alarm->enabled()) { |
628 | if ( alarm->hasTime () ) { | 628 | if ( alarm->hasTime () ) { |
629 | if ( alarm->time() < alarmStart ) { | 629 | if ( alarm->time() < alarmStart ) { |
630 | alarmStart = alarm->time(); | 630 | alarmStart = alarm->time(); |
631 | enabled = true; | 631 | enabled = true; |
632 | off = alarmStart.secsTo( incidenceStart ); | 632 | off = alarmStart.secsTo( incidenceStart ); |
633 | } | 633 | } |
634 | 634 | ||
635 | } else { | 635 | } else { |
636 | int secs = alarm->startOffset().asSeconds(); | 636 | int secs = alarm->startOffset().asSeconds(); |
637 | if ( incidenceStart.addSecs( secs ) < alarmStart ) { | 637 | if ( incidenceStart.addSecs( secs ) < alarmStart ) { |
638 | alarmStart = incidenceStart.addSecs( secs ); | 638 | alarmStart = incidenceStart.addSecs( secs ); |
639 | enabled = true; | 639 | enabled = true; |
640 | off = -secs; | 640 | off = -secs; |
641 | } | 641 | } |
642 | } | 642 | } |