author | ulf69 <ulf69> | 2004-07-02 15:38:16 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-07-02 15:38:16 (UTC) |
commit | 30988fc010930d5c43ca7bc51ba64d57210c3985 (patch) (side-by-side diff) | |
tree | 360ccd0055cb11d669f03baa350843e864746785 | |
parent | ead0dcba2c607297137e2b47418eb17864e0caaa (diff) | |
download | kdepimpi-30988fc010930d5c43ca7bc51ba64d57210c3985.zip kdepimpi-30988fc010930d5c43ca7bc51ba64d57210c3985.tar.gz kdepimpi-30988fc010930d5c43ca7bc51ba64d57210c3985.tar.bz2 |
bugfix: choosen filenames where not used while import/export and for resources
-rw-r--r-- | kabc/plugins/opie/resourceopie.cpp | 7 | ||||
-rw-r--r-- | kaddressbook/xxport/opie/opie_xxport.cpp | 10 |
2 files changed, 14 insertions, 3 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 @@ -46,6 +46,7 @@ $Id$ //US #include <qpe/qpeapplication.h> #include <opie/ocontactaccess.h> +#include <opie/ocontactaccessbackend_xml.h> #include "resource.h" #include "resourceopieconfig.h" @@ -180,7 +181,10 @@ 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 ) { qDebug("Unable to load file() %s", mFileName.latin1()); @@ -215,6 +219,7 @@ 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 @@ -34,6 +34,8 @@ $Id$ #include <kmessagebox.h> #include <opie/ocontactaccess.h> +#include <opie/ocontactaccessbackend_xml.h> + #include "stdaddressbook.h" /*US @@ -96,7 +98,8 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString if ( fileName.isEmpty() ) 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 ) { qDebug("Unable to access file() %s", fileName.latin1()); @@ -139,6 +142,7 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString access->save(); delete access; + delete backend; return true; } @@ -158,7 +162,8 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const if ( fileName.isEmpty() ) 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 ) { qDebug("Unable to access file() %s", fileName.latin1()); @@ -190,6 +195,7 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const } delete access; + delete backend; return adrlst; |