From 3bbc14431e854bc3d8870b5ba12d64f6e1af6eb6 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 25 Sep 2005 02:09:22 +0000 Subject: todo timer fix --- diff --git a/korganizer/main.cpp b/korganizer/main.cpp index a96f7c2..9410c6a 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp @@ -105,6 +105,9 @@ int main( int argc, char **argv ) } +#ifndef DESKTOP_VERSION + QPEApplication::setTempScreenSaverMode ( QPEApplication::Disable ); +#endif a.exec(); dumpMissing(); diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index d1e369c..05e5087 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -26,7 +26,7 @@ #include #include #include -#include // for sleep +//#include // for sleep #else #include #include @@ -2045,7 +2045,6 @@ void MainWindow::save() return; } } - if ( mView->viewManager()->journalView() ) mView->viewManager()->journalView()->checkModified(); if ( !mCalendarModifiedFlag ) { @@ -2056,6 +2055,9 @@ void MainWindow::save() slotModifiedChanged( true ); return; } +#ifndef DESKTOP_VERSION + QPEApplication::setTempScreenSaverMode ( QPEApplication::Disable ); +#endif mSaveDelay = 0; mSyncManager->setBlockSave(true); if ( mView->checkAllFileVersions() ) { @@ -2088,6 +2090,9 @@ void MainWindow::save() slotModifiedChanged( true ); } mSyncManager->setBlockSave( false ); +#ifndef DESKTOP_VERSION + QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable ); +#endif } void MainWindow::keyReleaseEvent ( QKeyEvent * e) @@ -2506,8 +2511,14 @@ void MainWindow::saveCalendar() bool enabled = KPimGlobalPrefs::instance()->mBackupEnabled; KPimGlobalPrefs::instance()->mBackupEnabled = false; save(); +#ifndef DESKTOP_VERSION + QPEApplication::setTempScreenSaverMode ( QPEApplication::Disable ); +#endif KPimGlobalPrefs::instance()->mBackupEnabled = enabled; backupAllFiles(); +#ifndef DESKTOP_VERSION + QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable ); +#endif } void MainWindow::loadCalendar() { diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index f7d40ad..70a7711 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -29,6 +29,10 @@ #include "icalformat.h" #include "todo.h" +#ifndef DESKTOP_VERSION +#include +#endif + #define SAVETIMER_TIMEOUT_SECONDS 300 //#define SAVETIMER_TIMEOUT_SECONDS 8 #define SAVETIMER_TIMEOUT_RETRY_SECONDS 5 @@ -139,7 +143,6 @@ void Todo::timerSlotSaveRunningInfoToFile() qDebug("KO Todo::saveTimerTimeout restarting! millisecs %d", msecs - ( ( mCurrentTimerDelay * 1000 ) + 50 ) ); restartSaveTimer( SAVETIMER_TIMEOUT_RETRY_SECONDS ); return; - } restartSaveTimer( SAVETIMER_TIMEOUT_SECONDS ); saveRunningInfoToFile( QString::null ); @@ -151,6 +154,9 @@ void Todo::saveRunningInfoToFile() } void Todo::saveRunningInfoToFile( QString comment ) { +#ifndef DESKTOP_VERSION + QPEApplication::setTempScreenSaverMode ( QPEApplication::Disable ); +#endif //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); if ( mRunStart.secsTo ( mRunEnd) < 15 ) { qDebug("Running time < 15 seconds. Skipped. "); @@ -184,7 +190,9 @@ void Todo::saveRunningInfoToFile( QString comment ) file = dir +"/" +file +".ics"; format.save( &cal, file ); saveParents(); - +#ifndef DESKTOP_VERSION + QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable ); +#endif } void Todo::saveParents() { -- cgit v0.9.0.2