summaryrefslogtreecommitdiffabout
path: root/libkcal
Side-by-side diff
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/todo.cpp16
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;