-rw-r--r-- | kabc/plugins/opie/resourceopie.cpp | 9 |
1 files changed, 7 insertions, 2 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" @@ -178,10 +179,13 @@ void ResourceOpie::doClose() 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; } |