-rw-r--r-- | korganizer/kotodoviewitem.cpp | 2 | ||||
-rw-r--r-- | libkcal/todo.cpp | 16 | ||||
-rw-r--r-- | microkde/kglobalsettings.cpp | 10 | ||||
-rw-r--r-- | microkde/kglobalsettings.h | 1 |
4 files changed, 27 insertions, 2 deletions
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index 66f8d06..8cb6b83 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp @@ -131,3 +131,3 @@ void KOTodoViewItem::construct() skeyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); - keyd = KGlobal::locale()->formatDate( d ); + keyd = KGlobal::locale()->formatDate( d , true); keyt = KGlobal::locale()->formatTime( t ); diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 7dee4cd..c008fe1 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -21,4 +21,6 @@ #include <kglobal.h> +#include <kglobalsettings.h> #include <klocale.h> #include <kdebug.h> +#include <qregexp.h> @@ -77,3 +79,15 @@ 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()); + + + } diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp index b837b23..e54b0d9 100644 --- a/microkde/kglobalsettings.cpp +++ b/microkde/kglobalsettings.cpp @@ -39,2 +39,12 @@ QFont KGlobalSettings::generalMaxFont() } + +QString KGlobalSettings::timeTrackerDir() +{ + static QString dir; + if ( dir.isEmpty() ) { + dir = locateLocal( "data", "timetracker" ); + } + return dir; +} + QFont KGlobalSettings::toolBarFont() diff --git a/microkde/kglobalsettings.h b/microkde/kglobalsettings.h index 075bb1c..3eeda35 100644 --- a/microkde/kglobalsettings.h +++ b/microkde/kglobalsettings.h @@ -19,2 +19,3 @@ class KGlobalSettings static QRect desktopGeometry( QWidget * ); + static QString timeTrackerDir(); |