summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/traninfo.cpp
Unidiff
Diffstat (limited to 'noncore/apps/checkbook/traninfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/traninfo.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/noncore/apps/checkbook/traninfo.cpp b/noncore/apps/checkbook/traninfo.cpp
index 5a770b0..460466c 100644
--- a/noncore/apps/checkbook/traninfo.cpp
+++ b/noncore/apps/checkbook/traninfo.cpp
@@ -31,4 +31,6 @@
31#include <qpe/config.h> 31#include <qpe/config.h>
32 32
33QString tempstr;
34
33TranInfo::TranInfo( int id, const QString &desc, const QDate &date, bool withdrawal, 35TranInfo::TranInfo( int id, const QString &desc, const QDate &date, bool withdrawal,
34 const QString &type, const QString &category, float amount, 36 const QString &type, const QString &category, float amount,
@@ -118,4 +120,19 @@ TranInfo::TranInfo( Config config, int entry )
118} 120}
119 121
122const QString &TranInfo::datestr()
123{
124 tempstr = QString::number( td.year() );
125 tempstr.append( '/' );
126 int tempfield = td.month();
127 if ( tempfield < 10 ) tempstr.append( '0' );
128 tempstr.append( QString::number( tempfield ) );
129 tempstr.append( '/' );
130 tempfield = td.day();
131 if ( tempfield < 10 ) tempstr.append( '0' );
132 tempstr.append( QString::number( tempfield ) );
133
134 return( tempstr );
135}
136
120void TranInfo::write( Config *config, int entry ) 137void TranInfo::write( Config *config, int entry )
121{ 138{
@@ -124,7 +141,9 @@ void TranInfo::write( Config *config, int entry )
124 config->writeEntry( "Description", d ); 141 config->writeEntry( "Description", d );
125 142
126 QString tempstr = QString::number( td.month() ) + "/" + 143 tempstr = QString::number( td.month() );
127 QString::number( td.day() ) + "/" + 144 tempstr.append( '/' );
128 QString::number( td.year() ); 145 tempstr.append( QString::number( td.day() ) );
146 tempstr.append( '/' );
147 tempstr.append( QString::number( td.year() ) );
129 config->writeEntry( "Date", tempstr ); 148 config->writeEntry( "Date", tempstr );
130 149