summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/ocontactaccess.cpp8
-rw-r--r--libopie2/opiepim/core/ocontactaccess.cpp8
2 files changed, 14 insertions, 2 deletions
diff --git a/libopie/pim/ocontactaccess.cpp b/libopie/pim/ocontactaccess.cpp
index 2d808f7..8a8ff08 100644
--- a/libopie/pim/ocontactaccess.cpp
+++ b/libopie/pim/ocontactaccess.cpp
@@ -21,6 +21,9 @@
* =====================================================================
* History:
* $Log$
+ * Revision 1.2 2002/10/02 16:18:11 eilers
+ * debugged and seems to work almost perfectly ..
+ *
* Revision 1.1 2002/09/27 17:11:44 eilers
* Added API for accessing the Contact-Database ! It is compiling, but
* please do not expect that anything is working !
@@ -61,7 +64,10 @@ OContactAccess::OContactAccess ( const QString appname, const QString filename,
if( end == 0 ) {
end = new OContactAccessBackend_XML( appname, filename );
}
+ // Set backend locally and in template
m_backEnd = end;
+ OPimAccessTemplate<OContact>::setBackEnd (end);
+
/* Connect signal of external db change to function */
QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this );
@@ -82,7 +88,7 @@ OContactAccess::~OContactAccess ()
*/
if ( m_changed )
save();
- delete m_backEnd;
+ // delete m_backEnd; is done by template..
}
bool OContactAccess::load()
diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp
index 2d808f7..8a8ff08 100644
--- a/libopie2/opiepim/core/ocontactaccess.cpp
+++ b/libopie2/opiepim/core/ocontactaccess.cpp
@@ -21,6 +21,9 @@
* =====================================================================
* History:
* $Log$
+ * Revision 1.2 2002/10/02 16:18:11 eilers
+ * debugged and seems to work almost perfectly ..
+ *
* Revision 1.1 2002/09/27 17:11:44 eilers
* Added API for accessing the Contact-Database ! It is compiling, but
* please do not expect that anything is working !
@@ -61,7 +64,10 @@ OContactAccess::OContactAccess ( const QString appname, const QString filename,
if( end == 0 ) {
end = new OContactAccessBackend_XML( appname, filename );
}
+ // Set backend locally and in template
m_backEnd = end;
+ OPimAccessTemplate<OContact>::setBackEnd (end);
+
/* Connect signal of external db change to function */
QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this );
@@ -82,7 +88,7 @@ OContactAccess::~OContactAccess ()
*/
if ( m_changed )
save();
- delete m_backEnd;
+ // delete m_backEnd; is done by template..
}
bool OContactAccess::load()