summaryrefslogtreecommitdiffabout
path: root/libkcal/todo.cpp
authorzautrix <zautrix>2005-06-17 07:51:48 (UTC)
committer zautrix <zautrix>2005-06-17 07:51:48 (UTC)
commit825c34c11200f8ff0229cfb00b82b1880ef55b94 (patch) (unidiff)
tree243df776d77afe55ca36ca8a78586a9e2fca1888 /libkcal/todo.cpp
parenta04fff3ce192e0bebf9243a1fbedb97cf7108d2b (diff)
downloadkdepimpi-825c34c11200f8ff0229cfb00b82b1880ef55b94.zip
kdepimpi-825c34c11200f8ff0229cfb00b82b1880ef55b94.tar.gz
kdepimpi-825c34c11200f8ff0229cfb00b82b1880ef55b94.tar.bz2
fixes
Diffstat (limited to 'libkcal/todo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/todo.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index e98af3c..d062492 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -66,12 +66,20 @@ void Todo::setRunningFalse( QString s )
66 if ( ! mRunning ) 66 if ( ! mRunning )
67 return; 67 return;
68 mRunning = false; 68 mRunning = false;
69 mRunSaveTimer->stop(); 69 mRunSaveTimer->stop();
70 saveRunningInfoToFile( s ); 70 saveRunningInfoToFile( s );
71} 71}
72void Todo::stopRunning()
73{
74 if ( !mRunning )
75 return;
76 if ( mRunSaveTimer )
77 mRunSaveTimer->stop();
78 mRunning = false;
79}
72void Todo::setRunning( bool run ) 80void Todo::setRunning( bool run )
73{ 81{
74 if ( run == mRunning ) 82 if ( run == mRunning )
75 return; 83 return;
76 //qDebug("Todo::setRunning %d ", run); 84 //qDebug("Todo::setRunning %d ", run);
77 if ( !mRunSaveTimer ) { 85 if ( !mRunSaveTimer ) {
@@ -92,13 +100,13 @@ void Todo::saveRunningInfoToFile()
92{ 100{
93 saveRunningInfoToFile( QString::null ); 101 saveRunningInfoToFile( QString::null );
94} 102}
95void Todo::saveRunningInfoToFile( QString comment ) 103void Todo::saveRunningInfoToFile( QString comment )
96{ 104{
97 //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); 105 //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1());
98 if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 30 ) { 106 if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 10 ) {
99 qDebug("Running time < 30 seconds. Skipped. "); 107 qDebug("Running time < 30 seconds. Skipped. ");
100 return; 108 return;
101 } 109 }
102 QString dir = KGlobalSettings::timeTrackerDir(); 110 QString dir = KGlobalSettings::timeTrackerDir();
103 //qDebug("%s ", dir.latin1()); 111 //qDebug("%s ", dir.latin1());
104 QString file = "%1%2%3-%4%5%6-"; 112 QString file = "%1%2%3-%4%5%6-";