summaryrefslogtreecommitdiff
authoreilers <eilers>2002-10-02 16:18:11 (UTC)
committer eilers <eilers>2002-10-02 16:18:11 (UTC)
commit1400bbe439c47f0bd168d602d961235c638a861b (patch) (side-by-side diff)
tree2612a28330ee6b48d6f06b476448cee66308c9f3
parent140d28d0fd72015616351702f085ca9f0c9a959c (diff)
downloadopie-1400bbe439c47f0bd168d602d961235c638a861b.zip
opie-1400bbe439c47f0bd168d602d961235c638a861b.tar.gz
opie-1400bbe439c47f0bd168d602d961235c638a861b.tar.bz2
debugged and seems to work almost perfectly ..
Diffstat (more/less context) (ignore 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
@@ -18,12 +18,15 @@
*
* =====================================================================
* Version: $Id$
* =====================================================================
* 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 !
* I will debug that stuff in the next time ..
* Please read README_COMPILE for compiling !
*
@@ -58,13 +61,16 @@ OContactAccess::OContactAccess ( const QString appname, const QString filename,
/* take care of the backend. If there is no one defined, we
* will use the XML-Backend as default (until we have a cute SQL-Backend..).
*/
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 );
connect( dbchannel, SIGNAL(received(const QCString &, const QByteArray &)),
this, SLOT(copMessage( const QCString &, const QByteArray &)) );
if ( autosync ){
@@ -79,13 +85,13 @@ OContactAccess::~OContactAccess ()
{
/* The user may forget to save the changed database, therefore try to
* do it for him..
*/
if ( m_changed )
save();
- delete m_backEnd;
+ // delete m_backEnd; is done by template..
}
bool OContactAccess::load()
{
return ( m_backEnd->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
@@ -18,12 +18,15 @@
*
* =====================================================================
* Version: $Id$
* =====================================================================
* 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 !
* I will debug that stuff in the next time ..
* Please read README_COMPILE for compiling !
*
@@ -58,13 +61,16 @@ OContactAccess::OContactAccess ( const QString appname, const QString filename,
/* take care of the backend. If there is no one defined, we
* will use the XML-Backend as default (until we have a cute SQL-Backend..).
*/
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 );
connect( dbchannel, SIGNAL(received(const QCString &, const QByteArray &)),
this, SLOT(copMessage( const QCString &, const QByteArray &)) );
if ( autosync ){
@@ -79,13 +85,13 @@ OContactAccess::~OContactAccess ()
{
/* The user may forget to save the changed database, therefore try to
* do it for him..
*/
if ( m_changed )
save();
- delete m_backEnd;
+ // delete m_backEnd; is done by template..
}
bool OContactAccess::load()
{
return ( m_backEnd->load() );
}