summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
index 132c9fc..dd9dbde 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
@@ -9,16 +9,19 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
* =====================================================================
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.3 2003/12/08 15:18:10 eilers
+ * Committing unfinished sql implementation before merging to libopie2 starts..
+ *
* Revision 1.2 2003/09/29 07:44:26 eilers
* Improvement of PIM-SQL Databases, but search queries are still limited.
* Addressbook: Changed table layout. Now, we just need 1/3 of disk-space.
* Todo: Started to add new attributes. Some type conversions missing.
*
* Revision 1.1 2003/09/22 14:31:16 eilers
* Added first experimental incarnation of sql-backend for addressbook.
* Some modifications to be able to compile the todo sql-backend.
@@ -449,17 +452,18 @@ namespace {
}
};
/* --------------------------------------------------------------------------- */
OContactAccessBackend_SQL::OContactAccessBackend_SQL ( const QString& /* appname */,
- const QString& filename ): m_changed(false)
+ const QString& filename ):
+ OContactAccessBackend(), m_changed(false), m_driver( NULL )
{
qWarning("C'tor OContactAccessBackend_SQL starts");
QTime t;
t.start();
/* Expecting to access the default filename if nothing else is set */
if ( filename.isEmpty() ){
m_fileName = Global::applicationFileName( "addressbook","addressbook.db" );
@@ -471,16 +475,21 @@ OContactAccessBackend_SQL::OContactAccessBackend_SQL ( const QString& /* appname
m_driver = man.standard();
m_driver->setUrl( m_fileName );
load();
qWarning("C'tor OContactAccessBackend_SQL ends: %d ms", t.elapsed() );
}
+OContactAccessBackend_SQL::~OContactAccessBackend_SQL ()
+{
+ if( m_driver )
+ delete m_driver;
+}
bool OContactAccessBackend_SQL::load ()
{
if (!m_driver->open() )
return false;
// Don't expect that the database exists.
// It is save here to create the table, even if it