-rw-r--r-- | kabc/plugins/opie/resourceopie.cpp | 9 | ||||
-rw-r--r-- | kaddressbook/xxport/opie/opie_xxport.cpp | 12 |
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 @@ -48,2 +48,3 @@ $Id$ #include <opie/ocontactaccess.h> +#include <opie/ocontactaccessbackend_xml.h> @@ -181,4 +182,7 @@ bool ResourceOpie::load() 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); @@ -217,2 +221,3 @@ bool ResourceOpie::load() delete access; + delete backend; 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 @@ -36,2 +36,4 @@ $Id$ #include <opie/ocontactaccess.h> +#include <opie/ocontactaccessbackend_xml.h> + #include "stdaddressbook.h" @@ -98,3 +100,4 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString - 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); @@ -141,3 +144,4 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString delete access; - + delete backend; + return true; @@ -160,3 +164,4 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const - 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); @@ -192,2 +197,3 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const delete access; + delete backend; |