summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-07-02 15:38:16 (UTC)
committer ulf69 <ulf69>2004-07-02 15:38:16 (UTC)
commit30988fc010930d5c43ca7bc51ba64d57210c3985 (patch) (side-by-side diff)
tree360ccd0055cb11d669f03baa350843e864746785
parentead0dcba2c607297137e2b47418eb17864e0caaa (diff)
downloadkdepimpi-30988fc010930d5c43ca7bc51ba64d57210c3985.zip
kdepimpi-30988fc010930d5c43ca7bc51ba64d57210c3985.tar.gz
kdepimpi-30988fc010930d5c43ca7bc51ba64d57210c3985.tar.bz2
bugfix: choosen filenames where not used while import/export and for resources
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kabc/plugins/opie/resourceopie.cpp7
-rw-r--r--kaddressbook/xxport/opie/opie_xxport.cpp10
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
@@ -45,8 +45,9 @@ $Id$
//US #include "formatfactory.h"
//US #include <qpe/qpeapplication.h>
#include <opie/ocontactaccess.h>
+#include <opie/ocontactaccessbackend_xml.h>
#include "resource.h"
#include "resourceopieconfig.h"
#include "stdaddressbook.h"
@@ -179,9 +180,12 @@ 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());
addressBook()->error( i18n( "Unable to load file '%1'." ).arg( mFileName ) );
@@ -214,8 +218,9 @@ bool ResourceOpie::load()
// qDebug("found %s", c.fullName().latin1());
}
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
@@ -33,8 +33,10 @@ $Id$
#include <kfiledialog.h>
#include <kmessagebox.h>
#include <opie/ocontactaccess.h>
+#include <opie/ocontactaccessbackend_xml.h>
+
#include "stdaddressbook.h"
/*US
#include <qfile.h>
@@ -95,9 +97,10 @@ 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());
addressBook()->error( i18n( "Unable to access file '%1'." ).arg( fileName ) );
@@ -138,8 +141,9 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString
access->save();
delete access;
+ delete backend;
return true;
}
@@ -157,9 +161,10 @@ 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());
addressBook()->error( i18n( "Unable to access file '%1'." ).arg( fileName ) );
@@ -189,8 +194,9 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const
// qDebug("found %s", c.fullName().latin1());
}
delete access;
+ delete backend;
return adrlst;
}