author | allenforsythe <allenforsythe> | 2003-05-28 11:49:47 (UTC) |
---|---|---|
committer | allenforsythe <allenforsythe> | 2003-05-28 11:49:47 (UTC) |
commit | 52047fd3d3f30509d65834747c3a0c5c6760dc01 (patch) (unidiff) | |
tree | 136945c2ffff2434ba1e3c8959b5335f5016e8f8 /noncore/apps/qashmoney/budget.cpp | |
parent | 7c85b3e98921afa74c7c6a90da4dfd54631c89c5 (diff) | |
download | opie-52047fd3d3f30509d65834747c3a0c5c6760dc01.zip opie-52047fd3d3f30509d65834747c3a0c5c6760dc01.tar.gz opie-52047fd3d3f30509d65834747c3a0c5c6760dc01.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'noncore/apps/qashmoney/budget.cpp') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | noncore/apps/qashmoney/budget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/apps/qashmoney/budget.cpp b/noncore/apps/qashmoney/budget.cpp index 42f7eca..9f74078 100755 --- a/noncore/apps/qashmoney/budget.cpp +++ b/noncore/apps/qashmoney/budget.cpp | |||
@@ -1,9 +1,10 @@ | |||
1 | #include "budget.h" | 1 | #include "budget.h" |
2 | #include "transaction.h" | 2 | #include "transaction.h" |
3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
4 | #include <iostream.h> | ||
4 | 5 | ||
5 | extern Transaction *transaction; | 6 | extern Transaction *transaction; |
6 | 7 | ||
7 | Budget::Budget () | 8 | Budget::Budget () |
8 | { | 9 | { |
9 | bdb = sqlite_open ( "qmbudgets.db", 0, NULL ); | 10 | bdb = sqlite_open ( "qmbudgets.db", 0, NULL ); |
@@ -59,13 +60,13 @@ int Budget::getNumberOfLineItems ( int budgetid ) | |||
59 | 60 | ||
60 | QStringList* Budget::getBudgetNames () | 61 | QStringList* Budget::getBudgetNames () |
61 | { | 62 | { |
62 | QStringList *names = new QStringList (); | 63 | QStringList *names = new QStringList (); |
63 | char **results; | 64 | char **results; |
64 | int rows, counter; | 65 | int rows, counter; |
65 | sqlite_get_table ( bdb, "select name from budgets order by name asc;", &results, &rows, NULL, NULL ); | 66 | sqlite_get_table ( bdb, "select name from budgets;", &results, &rows, NULL, NULL ); |
66 | names->append ( "None" ); | 67 | names->append ( "None" ); |
67 | for ( counter = 0; counter < rows; counter++ ) | 68 | for ( counter = 0; counter < rows; counter++ ) |
68 | names->append ( results [ counter+1 ] ); | 69 | names->append ( results [ counter+1 ] ); |
69 | return names; | 70 | return names; |
70 | } | 71 | } |
71 | 72 | ||