author | zautrix <zautrix> | 2005-04-09 20:54:29 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-09 20:54:29 (UTC) |
commit | ae58b2fe29fcd8b3690dcbb6d64976674f6294e0 (patch) (side-by-side diff) | |
tree | 7a321b610fa1f7cab980370a44bf78fea88bf481 /libkcal | |
parent | 9e43ebbe5867b2da957bb17c35bd357715424cba (diff) | |
download | kdepimpi-ae58b2fe29fcd8b3690dcbb6d64976674f6294e0.zip kdepimpi-ae58b2fe29fcd8b3690dcbb6d64976674f6294e0.tar.gz kdepimpi-ae58b2fe29fcd8b3690dcbb6d64976674f6294e0.tar.bz2 |
cool
-rw-r--r-- | libkcal/todo.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 7dee4cd..c008fe1 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -16,14 +16,16 @@ along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <kglobal.h> +#include <kglobalsettings.h> #include <klocale.h> #include <kdebug.h> +#include <qregexp.h> #include "todo.h" using namespace KCal; Todo::Todo(): Incidence() @@ -72,13 +74,25 @@ void Todo::setRunning( bool run ) saveRunningInfoToFile(); } } void Todo::saveRunningInfoToFile() { - qDebug("Todo::saveRunningInfoToFile() "); + qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); + + QString dir = KGlobalSettings::timeTrackerDir(); + qDebug("%s ", dir.latin1()); + QString file = "%1-%2-%3-%4-%5-%6-%7.tt"; + + file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 ).arg( mRunStart.time().msec(), 3 ); + file.replace ( QRegExp (" "), "0" ); + file = dir +"/" +file; + qDebug("%s ", file.latin1()); + + + } int Todo::runTime() { if ( !mRunning ) return 0; |