summaryrefslogtreecommitdiff
path: root/noncore/apps/qashmoney/budget.cpp
Unidiff
Diffstat (limited to 'noncore/apps/qashmoney/budget.cpp') (more/less context) (ignore whitespace changes)
-rwxr-xr-xnoncore/apps/qashmoney/budget.cpp3
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
5extern Transaction *transaction; 6extern Transaction *transaction;
6 7
7Budget::Budget () 8Budget::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
60QStringList* Budget::getBudgetNames () 61QStringList* 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