Diffstat (limited to 'noncore/apps/checkbook/checkbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/checkbook.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/apps/checkbook/checkbook.cpp b/noncore/apps/checkbook/checkbook.cpp index 77c1f57..ab25516 100644 --- a/noncore/apps/checkbook/checkbook.cpp +++ b/noncore/apps/checkbook/checkbook.cpp | |||
@@ -311,7 +311,7 @@ void Checkbook::loadCheckbook() | |||
311 | stramount.sprintf( "%c%.2f", currencySymbol, amount ); | 311 | stramount.sprintf( "%c%.2f", currencySymbol, amount ); |
312 | 312 | ||
313 | // Add to transaction list | 313 | // Add to transaction list |
314 | transactions.append( tran ); | 314 | transactions.inSort( tran ); |
315 | 315 | ||
316 | // Add to transaction table | 316 | // Add to transaction table |
317 | ( void ) new QListViewItem( tranTable, QString::number( i ), tran->datestr(), | 317 | ( void ) new QListViewItem( tranTable, QString::number( i ), tran->datestr(), |
@@ -415,7 +415,7 @@ void Checkbook::slotNewTran() | |||
415 | stramount.sprintf( "%c%.2f", currencySymbol, amount ); | 415 | stramount.sprintf( "%c%.2f", currencySymbol, amount ); |
416 | 416 | ||
417 | // Add to transaction list | 417 | // Add to transaction list |
418 | transactions.append( traninfo ); | 418 | transactions.inSort( traninfo ); |
419 | 419 | ||
420 | // Add to transaction table | 420 | // Add to transaction table |
421 | ( void ) new QListViewItem( tranTable, QString::number( highTranNum ), | 421 | ( void ) new QListViewItem( tranTable, QString::number( highTranNum ), |
@@ -562,7 +562,7 @@ void Checkbook::drawCategoryChart( bool withdrawals ) | |||
562 | DataPointList *list = new DataPointList(); | 562 | DataPointList *list = new DataPointList(); |
563 | 563 | ||
564 | TranInfo *tran = transactions.first(); | 564 | TranInfo *tran = transactions.first(); |
565 | if ( tran->withdrawal() == withdrawals ) | 565 | if ( tran && tran->withdrawal() == withdrawals ) |
566 | { | 566 | { |
567 | list->append( new DataPointInfo( tran->category(), tran->amount() ) ); | 567 | list->append( new DataPointInfo( tran->category(), tran->amount() ) ); |
568 | } | 568 | } |