author | zautrix <zautrix> | 2005-06-11 18:34:05 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-11 18:34:05 (UTC) |
commit | b56d3be87557510285d3381250faf9b7af300680 (patch) (side-by-side diff) | |
tree | 887e24db261f56f78dda8397196a6125cc346fc5 | |
parent | 81370a5f955c2710b6e9336b6c412c8d630ef72a (diff) | |
download | kdepimpi-b56d3be87557510285d3381250faf9b7af300680.zip kdepimpi-b56d3be87557510285d3381250faf9b7af300680.tar.gz kdepimpi-b56d3be87557510285d3381250faf9b7af300680.tar.bz2 |
fixxx
-rw-r--r-- | korganizer/calendarview.cpp | 39 | ||||
-rw-r--r-- | microkde/kfiledialog.cpp | 2 |
2 files changed, 31 insertions, 10 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 8f5de4d..753d81f 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -644,5 +644,8 @@ void CalendarView::checkAlarms() QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); + int daysto = dt.daysTo( QDate::currentDate() ); + int days = config->readNumEntry( "LatestProgramStopDays" , daysto); + dt = dt.addDays( days ); int secto = dt.secsTo( QDateTime::currentDateTime() ); - int secs = config->readNumEntry( "LatestProgramStop" , secto) - 30; - qDebug("KO: Reading program stop %d ", secs); + int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30; + //qDebug("KO: Reading program stop %d ", secs); //secs -= ( 3600 * 24*3 ); // debug only @@ -650,3 +653,3 @@ void CalendarView::checkAlarms() qDebug("KO: Last termination on %s ", latest.toString().latin1()); - qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); + //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); QPtrList<Incidence> el = mCalendar->rawIncidences(); @@ -2160,9 +2163,12 @@ void CalendarView::writeSettings() config->setGroup( "AppRun" ); - QDateTime dt ( QDate (2005,3,1), QTime( 0,0,0 ) ); + QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); + int days = dt.daysTo( QDate::currentDate() ); + dt = dt.addDays( days ); int secs = dt.secsTo( QDateTime::currentDateTime() ); - config->writeEntry( "LatestProgramStop", secs ); - qDebug("KO: Writing stop time: %d ", secs); - qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); - QDateTime latest = dt.addSecs ( secs ); - qDebug("KO: Test termination on %s ", latest.toString().latin1()); + config->writeEntry( "LatestProgramStopDays", days ); + config->writeEntry( "LatestProgramStopSecs", secs ); + //qDebug("KO: Writing stop time: %d ", secs); + //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); + //QDateTime latest = dt.addSecs ( secs ); + //qDebug("KO: Termination on %s ", latest.toString().latin1()); config->setGroup( "Views" ); @@ -2170,2 +2176,17 @@ void CalendarView::writeSettings() +#if 0 + qDebug("********************* "); + qDebug("Testcode secsto "); + QDateTime dt_nodaylight ( QDate (2005,3,26), QTime( 0,0,0 ) ); + QDateTime dt_daylight ( QDate (2005,3,29), QTime( 0,0,0 ) ); + int secsto = dt_nodaylight.secsTo( dt_daylight ); + QDateTime dt_daylight_wrong = dt_nodaylight.addSecs( secsto ); + qDebug("dt nodaylight %s ",dt_nodaylight.toString().latin1() ); + qDebug("dt daylight %s ",dt_daylight.toString().latin1() ); + qDebug("dt daylight_wrong %s ",dt_daylight_wrong.toString().latin1() ); + qDebug("Computed secsTo %d . in minutes: %d . in hours: %d ", secsto, secsto/60, secsto/3600); + qDebug("********************* testcode end"); + +#endif + QValueList<int> listINT = mLeftFrame->sizes(); diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp index c64f325..383e711 100644 --- a/microkde/kfiledialog.cpp +++ b/microkde/kfiledialog.cpp @@ -64,3 +64,3 @@ QString KFileDialog::getExistingDirectory( const QString & fn, { - return KFileDialog::getSaveFileName( fn, cap, pr ); + return KFileDialog::getSaveFileName( fn, cap, par ); } |