author | zautrix <zautrix> | 2005-06-11 18:34:05 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-11 18:34:05 (UTC) |
commit | b56d3be87557510285d3381250faf9b7af300680 (patch) (unidiff) | |
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 | |||
@@ -642,13 +642,16 @@ void CalendarView::checkAlarms() | |||
642 | KConfig *config = KOGlobals::config(); | 642 | KConfig *config = KOGlobals::config(); |
643 | config->setGroup( "AppRun" ); | 643 | config->setGroup( "AppRun" ); |
644 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); | 644 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); |
645 | int daysto = dt.daysTo( QDate::currentDate() ); | ||
646 | int days = config->readNumEntry( "LatestProgramStopDays" , daysto); | ||
647 | dt = dt.addDays( days ); | ||
645 | int secto = dt.secsTo( QDateTime::currentDateTime() ); | 648 | int secto = dt.secsTo( QDateTime::currentDateTime() ); |
646 | int secs = config->readNumEntry( "LatestProgramStop" , secto) - 30; | 649 | int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30; |
647 | qDebug("KO: Reading program stop %d ", secs); | 650 | //qDebug("KO: Reading program stop %d ", secs); |
648 | //secs -= ( 3600 * 24*3 ); // debug only | 651 | //secs -= ( 3600 * 24*3 ); // debug only |
649 | QDateTime latest = dt.addSecs ( secs ); | 652 | QDateTime latest = dt.addSecs ( secs ); |
650 | qDebug("KO: Last termination on %s ", latest.toString().latin1()); | 653 | qDebug("KO: Last termination on %s ", latest.toString().latin1()); |
651 | qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); | 654 | //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); |
652 | QPtrList<Incidence> el = mCalendar->rawIncidences(); | 655 | QPtrList<Incidence> el = mCalendar->rawIncidences(); |
653 | QPtrList<Incidence> al; | 656 | QPtrList<Incidence> al; |
654 | Incidence* inL = el.first(); | 657 | Incidence* inL = el.first(); |
@@ -2158,16 +2161,34 @@ void CalendarView::writeSettings() | |||
2158 | 2161 | ||
2159 | writeFilterSettings(config); | 2162 | writeFilterSettings(config); |
2160 | config->setGroup( "AppRun" ); | 2163 | config->setGroup( "AppRun" ); |
2161 | QDateTime dt ( QDate (2005,3,1), QTime( 0,0,0 ) ); | 2164 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); |
2165 | int days = dt.daysTo( QDate::currentDate() ); | ||
2166 | dt = dt.addDays( days ); | ||
2162 | int secs = dt.secsTo( QDateTime::currentDateTime() ); | 2167 | int secs = dt.secsTo( QDateTime::currentDateTime() ); |
2163 | config->writeEntry( "LatestProgramStop", secs ); | 2168 | config->writeEntry( "LatestProgramStopDays", days ); |
2164 | qDebug("KO: Writing stop time: %d ", secs); | 2169 | config->writeEntry( "LatestProgramStopSecs", secs ); |
2165 | qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); | 2170 | //qDebug("KO: Writing stop time: %d ", secs); |
2166 | QDateTime latest = dt.addSecs ( secs ); | 2171 | //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); |
2167 | qDebug("KO: Test termination on %s ", latest.toString().latin1()); | 2172 | //QDateTime latest = dt.addSecs ( secs ); |
2173 | //qDebug("KO: Termination on %s ", latest.toString().latin1()); | ||
2168 | config->setGroup( "Views" ); | 2174 | config->setGroup( "Views" ); |
2169 | config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() ); | 2175 | config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() ); |
2170 | 2176 | ||
2177 | #if 0 | ||
2178 | qDebug("********************* "); | ||
2179 | qDebug("Testcode secsto "); | ||
2180 | QDateTime dt_nodaylight ( QDate (2005,3,26), QTime( 0,0,0 ) ); | ||
2181 | QDateTime dt_daylight ( QDate (2005,3,29), QTime( 0,0,0 ) ); | ||
2182 | int secsto = dt_nodaylight.secsTo( dt_daylight ); | ||
2183 | QDateTime dt_daylight_wrong = dt_nodaylight.addSecs( secsto ); | ||
2184 | qDebug("dt nodaylight %s ",dt_nodaylight.toString().latin1() ); | ||
2185 | qDebug("dt daylight %s ",dt_daylight.toString().latin1() ); | ||
2186 | qDebug("dt daylight_wrong %s ",dt_daylight_wrong.toString().latin1() ); | ||
2187 | qDebug("Computed secsTo %d . in minutes: %d . in hours: %d ", secsto, secsto/60, secsto/3600); | ||
2188 | qDebug("********************* testcode end"); | ||
2189 | |||
2190 | #endif | ||
2191 | |||
2171 | QValueList<int> listINT = mLeftFrame->sizes(); | 2192 | QValueList<int> listINT = mLeftFrame->sizes(); |
2172 | config->writeEntry("Left Splitter Frame",listINT); | 2193 | config->writeEntry("Left Splitter Frame",listINT); |
2173 | QValueList<int> listINT2 = mMainFrame->sizes(); | 2194 | QValueList<int> listINT2 = mMainFrame->sizes(); |
diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp index c64f325..383e711 100644 --- a/microkde/kfiledialog.cpp +++ b/microkde/kfiledialog.cpp | |||
@@ -62,7 +62,7 @@ QString KFileDialog::getOpenFileName( const QString & fn, | |||
62 | QString KFileDialog::getExistingDirectory( const QString & fn, | 62 | QString KFileDialog::getExistingDirectory( const QString & fn, |
63 | const QString & cap, QWidget * par ) | 63 | const QString & cap, QWidget * par ) |
64 | { | 64 | { |
65 | return KFileDialog::getSaveFileName( fn, cap, pr ); | 65 | return KFileDialog::getSaveFileName( fn, cap, par ); |
66 | } | 66 | } |
67 | #else | 67 | #else |
68 | 68 | ||