summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/opie/resourceopie.cpp9
-rw-r--r--kaddressbook/xxport/opie/opie_xxport.cpp12
2 files changed, 16 insertions, 5 deletions
diff --git a/kabc/plugins/opie/resourceopie.cpp b/kabc/plugins/opie/resourceopie.cpp
index f992301..a4f8d8a 100644
--- a/kabc/plugins/opie/resourceopie.cpp
+++ b/kabc/plugins/opie/resourceopie.cpp
@@ -47,4 +47,5 @@ $Id$
#include <opie/ocontactaccess.h>
+#include <opie/ocontactaccessbackend_xml.h>
#include "resource.h"
@@ -180,6 +181,9 @@ bool ResourceOpie::load()
// qDebug("ResourceOpie::load() %s", mFileName.latin1());
kdDebug(5700) << "ResourceOpie::load(): '" << mFileName << "'" << endl;
-
- OContactAccess* access = new OContactAccess("KDEPim/Pi", mFileName, 0l, false);
+
+ qDebug("ResourceOpie::load: Try to load file() %s", mFileName.latin1());
+
+ OContactAccessBackend_XML* backend = new OContactAccessBackend_XML( "KDEPim/Pi", mFileName );
+ OContactAccess* access = new OContactAccess("KDEPim/Pi", 0l, backend, false);
if ( !access ) {
@@ -216,4 +220,5 @@ bool ResourceOpie::load()
delete access;
+ delete backend;
return true;
diff --git a/kaddressbook/xxport/opie/opie_xxport.cpp b/kaddressbook/xxport/opie/opie_xxport.cpp
index 90d05cd..f30a205 100644
--- a/kaddressbook/xxport/opie/opie_xxport.cpp
+++ b/kaddressbook/xxport/opie/opie_xxport.cpp
@@ -35,4 +35,6 @@ $Id$
#include <opie/ocontactaccess.h>
+#include <opie/ocontactaccessbackend_xml.h>
+
#include "stdaddressbook.h"
@@ -97,5 +99,6 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString
return true;
- OContactAccess* access = new OContactAccess("KA/Pi", fileName, 0l, false);
+ OContactAccessBackend_XML* backend = new OContactAccessBackend_XML( "KA/Pi", fileName );
+ OContactAccess* access = new OContactAccess("KA/Pi", 0l, backend, false);
if ( !access ) {
@@ -140,5 +143,6 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString
delete access;
-
+ delete backend;
+
return true;
}
@@ -159,5 +163,6 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const
return KABC::AddresseeList();
- OContactAccess* access = new OContactAccess("KA/Pi", fileName, 0l, false);
+ OContactAccessBackend_XML* backend = new OContactAccessBackend_XML( "KA/Pi", fileName );
+ OContactAccess* access = new OContactAccess("KA/Pi", 0l, backend, false);
if ( !access ) {
@@ -191,4 +196,5 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const
delete access;
+ delete backend;
return adrlst;