Diffstat (limited to 'libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp index 2ee76cc..a779dc1 100644 --- a/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp +++ b/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp | |||
@@ -25,48 +25,50 @@ | |||
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | /* | 29 | /* |
30 | * SQL Backend for the OPIE-Calender Database. | 30 | * SQL Backend for the OPIE-Calender Database. |
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <stdio.h> | 34 | #include <stdio.h> |
35 | #include <stdlib.h> | 35 | #include <stdlib.h> |
36 | 36 | ||
37 | #include <qarray.h> | 37 | #include <qarray.h> |
38 | #include <qstringlist.h> | 38 | #include <qstringlist.h> |
39 | 39 | ||
40 | #include <qpe/global.h> | 40 | #include <qpe/global.h> |
41 | 41 | ||
42 | #include <opie2/osqldriver.h> | 42 | #include <opie2/osqldriver.h> |
43 | #include <opie2/osqlmanager.h> | 43 | #include <opie2/osqlmanager.h> |
44 | #include <opie2/osqlquery.h> | 44 | #include <opie2/osqlquery.h> |
45 | 45 | ||
46 | #include <opie2/opimrecurrence.h> | 46 | #include <opie2/opimrecurrence.h> |
47 | #include <opie2/odatebookaccessbackend_sql.h> | 47 | #include <opie2/odatebookaccessbackend_sql.h> |
48 | 48 | ||
49 | using namespace Opie::DB; | ||
50 | |||
49 | namespace Opie { | 51 | namespace Opie { |
50 | 52 | ||
51 | 53 | ||
52 | ODateBookAccessBackend_SQL::ODateBookAccessBackend_SQL( const QString& , | 54 | ODateBookAccessBackend_SQL::ODateBookAccessBackend_SQL( const QString& , |
53 | const QString& fileName ) | 55 | const QString& fileName ) |
54 | : ODateBookAccessBackend(), m_driver( NULL ) | 56 | : ODateBookAccessBackend(), m_driver( NULL ) |
55 | { | 57 | { |
56 | m_fileName = fileName.isEmpty() ? Global::applicationFileName( "datebook", "datebook.db" ) : fileName; | 58 | m_fileName = fileName.isEmpty() ? Global::applicationFileName( "datebook", "datebook.db" ) : fileName; |
57 | 59 | ||
58 | // Get the standart sql-driver from the OSQLManager.. | 60 | // Get the standart sql-driver from the OSQLManager.. |
59 | OSQLManager man; | 61 | OSQLManager man; |
60 | m_driver = man.standard(); | 62 | m_driver = man.standard(); |
61 | m_driver->setUrl( m_fileName ); | 63 | m_driver->setUrl( m_fileName ); |
62 | 64 | ||
63 | initFields(); | 65 | initFields(); |
64 | 66 | ||
65 | load(); | 67 | load(); |
66 | } | 68 | } |
67 | 69 | ||
68 | ODateBookAccessBackend_SQL::~ODateBookAccessBackend_SQL() { | 70 | ODateBookAccessBackend_SQL::~ODateBookAccessBackend_SQL() { |
69 | if( m_driver ) | 71 | if( m_driver ) |
70 | delete m_driver; | 72 | delete m_driver; |
71 | } | 73 | } |
72 | 74 | ||