summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-06-07 06:37:42 (UTC)
committer zautrix <zautrix>2005-06-07 06:37:42 (UTC)
commitff8af7ccdd6346bba1cb871c33931352bbafe40e (patch) (unidiff)
tree8a905fe8237cd1be7276b3c5f10479a9efdb6ee5 /korganizer
parent79f58240bc34d20601abe3325e1dc7e76e1ebe39 (diff)
downloadkdepimpi-ff8af7ccdd6346bba1cb871c33931352bbafe40e.zip
kdepimpi-ff8af7ccdd6346bba1cb871c33931352bbafe40e.tar.gz
kdepimpi-ff8af7ccdd6346bba1cb871c33931352bbafe40e.tar.bz2
fixx
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index e13d0be..720ad78 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -627,33 +627,34 @@ CalendarView::~CalendarView()
627{ 627{
628 // kdDebug() << "~CalendarView()" << endl; 628 // kdDebug() << "~CalendarView()" << endl;
629 //qDebug("CalendarView::~CalendarView() "); 629 //qDebug("CalendarView::~CalendarView() ");
630 delete mDialogManager; 630 delete mDialogManager;
631 delete mViewManager; 631 delete mViewManager;
632 delete mStorage; 632 delete mStorage;
633 delete mDateFrame ; 633 delete mDateFrame ;
634 delete beamDialog; 634 delete beamDialog;
635 delete mEventViewerDialog; 635 delete mEventViewerDialog;
636 //kdDebug() << "~CalendarView() done" << endl; 636 //kdDebug() << "~CalendarView() done" << endl;
637} 637}
638void CalendarView::checkAlarms() 638void CalendarView::checkAlarms()
639{ 639{
640 KConfig *config = KOGlobals::config(); 640 KConfig *config = KOGlobals::config();
641 config->setGroup( "AppRun" ); 641 config->setGroup( "AppRun" );
642 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); 642 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
643 int secs = config->readNumEntry( "LatestProgramStop" ) - 30; 643 int secto = dt.secsTo( QDateTime::currentDateTime() );
644 int secs = config->readNumEntry( "LatestProgramStop" , secto) - 30;
644 //secs -= ( 3600 * 24*3 ); // debug only 645 //secs -= ( 3600 * 24*3 ); // debug only
645 QDateTime latest = dt.addSecs ( secs ); 646 QDateTime latest = dt.addSecs ( secs );
646 qDebug("KO: Last termination on %s ", latest.toString().latin1()); 647 qDebug("KO: Last termination on %s ", latest.toString().latin1());
647 QPtrList<Incidence> el = mCalendar->rawIncidences(); 648 QPtrList<Incidence> el = mCalendar->rawIncidences();
648 QPtrList<Incidence> al; 649 QPtrList<Incidence> al;
649 Incidence* inL = el.first(); 650 Incidence* inL = el.first();
650 while ( inL ) { 651 while ( inL ) {
651 bool ok = false; 652 bool ok = false;
652 int offset = 0; 653 int offset = 0;
653 QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; 654 QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ;
654 if ( ok ) { 655 if ( ok ) {
655 //qDebug("OK %s",next.toString().latin1()); 656 //qDebug("OK %s",next.toString().latin1());
656 if ( next < QDateTime::currentDateTime() ) { 657 if ( next < QDateTime::currentDateTime() ) {
657 al.append( inL ); 658 al.append( inL );
658 //qDebug("found missed alarm: %s ", inL->summary().latin1() ); 659 //qDebug("found missed alarm: %s ", inL->summary().latin1() );
659 } 660 }