-rw-r--r-- | libkcal/todo.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index f7d40ad..70a7711 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -28,8 +28,12 @@ #include "calendarlocal.h" #include "icalformat.h" #include "todo.h" +#ifndef DESKTOP_VERSION +#include <qpe/qpeapplication.h> +#endif + #define SAVETIMER_TIMEOUT_SECONDS 300 //#define SAVETIMER_TIMEOUT_SECONDS 8 #define SAVETIMER_TIMEOUT_RETRY_SECONDS 5 @@ -138,9 +142,8 @@ void Todo::timerSlotSaveRunningInfoToFile() if ( msecs > ( ( mCurrentTimerDelay * 1000 ) + 50 )) { qDebug("KO Todo::saveTimerTimeout restarting! millisecs %d", msecs - ( ( mCurrentTimerDelay * 1000 ) + 50 ) ); restartSaveTimer( SAVETIMER_TIMEOUT_RETRY_SECONDS ); return; - } restartSaveTimer( SAVETIMER_TIMEOUT_SECONDS ); saveRunningInfoToFile( QString::null ); } @@ -150,8 +153,11 @@ void Todo::saveRunningInfoToFile() saveRunningInfoToFile( QString::null ); } 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. "); return; @@ -183,9 +189,11 @@ void Todo::saveRunningInfoToFile( QString comment ) ICalFormat format( false ); file = dir +"/" +file +".ics"; format.save( &cal, file ); saveParents(); - +#ifndef DESKTOP_VERSION + QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable ); +#endif } void Todo::saveParents() { if (!relatedTo() ) |