-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 @@ -26,12 +26,16 @@ #include <qfileinfo.h> #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 using namespace KCal; @@ -136,24 +140,26 @@ void Todo::timerSlotSaveRunningInfoToFile() } // qDebug("KO Todo::saveTimerTimeout restarting! millisecs %d", msecs - ( ( mCurrentTimerDelay * 1000 ) + 50 ) ); 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 ); } void Todo::saveRunningInfoToFile() { mRunEnd = QDateTime::currentDateTime(); 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; } QString dir = KGlobalSettings::timeTrackerDir(); @@ -181,13 +187,15 @@ void Todo::saveRunningInfoToFile( QString comment ) } cal.addIncidence( to ); 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() ) return; Incidence * inc = relatedTo(); |