-rw-r--r-- | libkcal/todo.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index b89abce..5e6ac22 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp | |||
@@ -56,24 +56,25 @@ Todo::Todo(const Todo &t) : QObject(),Incidence(t) | |||
56 | } | 56 | } |
57 | 57 | ||
58 | Todo::~Todo() | 58 | Todo::~Todo() |
59 | { | 59 | { |
60 | setRunning( false ); | 60 | setRunning( false ); |
61 | //qDebug("Todo::~Todo() "); | 61 | //qDebug("Todo::~Todo() "); |
62 | } | 62 | } |
63 | 63 | ||
64 | void Todo::setRunning( bool run ) | 64 | void Todo::setRunning( bool run ) |
65 | { | 65 | { |
66 | if ( run == mRunning ) | 66 | if ( run == mRunning ) |
67 | return; | 67 | return; |
68 | //qDebug("Todo::setRunning %d ", run); | ||
68 | if ( !mRunSaveTimer ) { | 69 | if ( !mRunSaveTimer ) { |
69 | mRunSaveTimer = new QTimer ( this ); | 70 | mRunSaveTimer = new QTimer ( this ); |
70 | connect ( mRunSaveTimer, SIGNAL( timeout() ), this , SLOT ( saveRunningInfoToFile() ) ); | 71 | connect ( mRunSaveTimer, SIGNAL( timeout() ), this , SLOT ( saveRunningInfoToFile() ) ); |
71 | } | 72 | } |
72 | mRunning = run; | 73 | mRunning = run; |
73 | if ( mRunning ) { | 74 | if ( mRunning ) { |
74 | mRunSaveTimer->start( 1000 * 60 * 5 ); // 5 min | 75 | mRunSaveTimer->start( 1000 * 60 * 5 ); // 5 min |
75 | mRunStart = QDateTime::currentDateTime(); | 76 | mRunStart = QDateTime::currentDateTime(); |
76 | } else { | 77 | } else { |
77 | mRunSaveTimer->stop(); | 78 | mRunSaveTimer->stop(); |
78 | saveRunningInfoToFile(); | 79 | saveRunningInfoToFile(); |
79 | } | 80 | } |