summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/traninfo.cpp
Unidiff
Diffstat (limited to 'noncore/apps/checkbook/traninfo.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/checkbook/traninfo.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/noncore/apps/checkbook/traninfo.cpp b/noncore/apps/checkbook/traninfo.cpp
index 4833af9..7bd2004 100644
--- a/noncore/apps/checkbook/traninfo.cpp
+++ b/noncore/apps/checkbook/traninfo.cpp
@@ -50,10 +50,10 @@ TranInfo::TranInfo( int id, const QString &desc, const QDate &date, bool withdra
50 _next=next; 50 _next=next;
51} 51}
52 52
53TranInfo::TranInfo( Config config, int entry ) 53TranInfo::TranInfo( Config *config, int entry )
54{ 54{
55 config.setGroup( QString::number( entry ) ); 55 config->setGroup( QString::number( entry ) );
56 QString desc = config.readEntry( "Description", "Not Found" ); 56 QString desc = config->readEntry( "Description", "Not Found" );
57 if ( desc != "Not Found" ) 57 if ( desc != "Not Found" )
58 { 58 {
59 // ID 59 // ID
@@ -64,7 +64,7 @@ TranInfo::TranInfo( Config config, int entry )
64 64
65 // Transaction date 65 // Transaction date
66 int yr, mn, dy; 66 int yr, mn, dy;
67 QString datestr = config.readEntry( "Date", "" ); 67 QString datestr = config->readEntry( "Date", "" );
68 int begin, end; 68 int begin, end;
69 begin = datestr.find( '/' ); 69 begin = datestr.find( '/' );
70 mn = datestr.left( begin ).toInt(); 70 mn = datestr.left( begin ).toInt();
@@ -74,10 +74,10 @@ TranInfo::TranInfo( Config config, int entry )
74 td.setYMD( yr, mn, dy ); 74 td.setYMD( yr, mn, dy );
75 75
76 // Deposit/withdrawal indicator ( withdrawal == TRUE ) 76 // Deposit/withdrawal indicator ( withdrawal == TRUE )
77 w = ( config.readEntry( "Payment", "false" ) == "true" ); 77 w = ( config->readEntry( "Payment", "false" ) == "true" );
78 78
79 // Type 79 // Type
80 QString type = config.readEntry( "Type", "0" ); 80 QString type = config->readEntry( "Type", "0" );
81 if ( w ) 81 if ( w )
82 { // Withdrawal types 82 { // Withdrawal types
83 if( type == "0" ) 83 if( type == "0" )
@@ -102,25 +102,25 @@ TranInfo::TranInfo( Config config, int entry )
102 } 102 }
103 103
104 // Category 104 // Category
105 c = config.readEntry( "Category", "" ); 105 c = config->readEntry( "Category", "" );
106 106
107 // Transaction amount 107 // Transaction amount
108 QString stramount = config.readEntry( "Amount", "0.00" ); 108 QString stramount = config->readEntry( "Amount", "0.00" );
109 bool ok; 109 bool ok;
110 a = stramount.toFloat( &ok ); 110 a = stramount.toFloat( &ok );
111 111
112 // Transaction fee 112 // Transaction fee
113 stramount = config.readEntry( "TransactionFee", "0.00" ); 113 stramount = config->readEntry( "TransactionFee", "0.00" );
114 f = stramount.toFloat( &ok ); 114 f = stramount.toFloat( &ok );
115 115
116 // Transaction number 116 // Transaction number
117 cn = config.readEntry( "CheckNumber", "" ); 117 cn = config->readEntry( "CheckNumber", "" );
118 118
119 // Notes 119 // Notes
120 n = config.readEntry( "Comments", "" ); 120 n = config->readEntry( "Comments", "" );
121 121
122 // next 122 // next
123 _next = config.readNumEntry("Next", -1); 123 _next = config->readNumEntry("Next", -1);
124 } 124 }
125} 125}
126 126