summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 8d992b9..4b82aa8 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -650,13 +650,15 @@ void CalendarView::checkAlarms()
650 QPtrList<Incidence> el = mCalendar->rawIncidences(); 650 QPtrList<Incidence> el = mCalendar->rawIncidences();
651 QPtrList<Incidence> al; 651 QPtrList<Incidence> al;
652 Incidence* inL = el.first(); 652 Incidence* inL = el.first();
653 QDateTime cur = QDateTime::currentDateTime().addSecs(-59);
654 qDebug("KO: Checking alarm until %s ", cur.toString().latin1());
653 while ( inL ) { 655 while ( inL ) {
654 bool ok = false; 656 bool ok = false;
655 int offset = 0; 657 int offset = 0;
656 QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; 658 QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ;
657 if ( ok ) { 659 if ( ok ) {
658 //qDebug("OK %s",next.toString().latin1()); 660 //qDebug("OK %s",next.toString().latin1());
659 if ( next < QDateTime::currentDateTime() ) { 661 if ( next < cur ) {
660 al.append( inL ); 662 al.append( inL );
661 //qDebug("found missed alarm: %s ", inL->summary().latin1() ); 663 //qDebug("found missed alarm: %s ", inL->summary().latin1() );
662 } 664 }
@@ -832,7 +834,7 @@ void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti )
832 //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); 834 //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
833 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { 835 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
834#ifndef DESKTOP_VERSION 836#ifndef DESKTOP_VERSION
835 AlarmServer::addAlarm ( qdt,"koalarm", noti.latin1() ); 837 AlarmServer::addAlarm ( qdt,"koalarm", noti.utf8() );
836#endif 838#endif
837 return; 839 return;
838 } 840 }