author | drw <drw> | 2005-03-10 21:39:47 (UTC) |
---|---|---|
committer | drw <drw> | 2005-03-10 21:39:47 (UTC) |
commit | 5a276878608d30e2cdc2eb35ad7c45ed0c348f58 (patch) (unidiff) | |
tree | 93ff7eac4949b70ae25f60f4586e7490425134db /noncore/apps | |
parent | d798f87314392033ad1e18d01927c622aa4d9b02 (diff) | |
download | opie-5a276878608d30e2cdc2eb35ad7c45ed0c348f58.zip opie-5a276878608d30e2cdc2eb35ad7c45ed0c348f58.tar.gz opie-5a276878608d30e2cdc2eb35ad7c45ed0c348f58.tar.bz2 |
Fix for bug #1604 - Checkbook crashes on startup
-rw-r--r-- | noncore/apps/checkbook/cbinfo.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/checkbook/traninfo.cpp | 24 | ||||
-rw-r--r-- | noncore/apps/checkbook/traninfo.h | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/noncore/apps/checkbook/cbinfo.cpp b/noncore/apps/checkbook/cbinfo.cpp index 36dde04..6e3afa7 100644 --- a/noncore/apps/checkbook/cbinfo.cpp +++ b/noncore/apps/checkbook/cbinfo.cpp | |||
@@ -180,3 +180,3 @@ void CBInfo::loadTransactions() | |||
180 | _last=i; | 180 | _last=i; |
181 | tran=new TranInfo(config, i); | 181 | tran=new TranInfo(&config, i); |
182 | trandesc = tran->desc(); | 182 | trandesc = tran->desc(); |
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 | |||
@@ -52,6 +52,6 @@ TranInfo::TranInfo( int id, const QString &desc, const QDate &date, bool withdra | |||
52 | 52 | ||
53 | TranInfo::TranInfo( Config config, int entry ) | 53 | TranInfo::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" ) |
@@ -66,3 +66,3 @@ TranInfo::TranInfo( Config config, int entry ) | |||
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; |
@@ -76,6 +76,6 @@ TranInfo::TranInfo( Config config, int entry ) | |||
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 ) |
@@ -104,6 +104,6 @@ TranInfo::TranInfo( Config config, int entry ) | |||
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; |
@@ -112,3 +112,3 @@ TranInfo::TranInfo( Config config, int entry ) | |||
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 ); |
@@ -116,9 +116,9 @@ TranInfo::TranInfo( Config config, int entry ) | |||
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 | } |
diff --git a/noncore/apps/checkbook/traninfo.h b/noncore/apps/checkbook/traninfo.h index cbe0238..2ecb60d 100644 --- a/noncore/apps/checkbook/traninfo.h +++ b/noncore/apps/checkbook/traninfo.h | |||
@@ -43,3 +43,3 @@ class TranInfo | |||
43 | const QString & = 0x0, const QString & = 0x0, int =-1 ); | 43 | const QString & = 0x0, const QString & = 0x0, int =-1 ); |
44 | TranInfo( Config, int ); | 44 | TranInfo( Config *, int ); |
45 | 45 | ||