summaryrefslogtreecommitdiffabout
path: root/kaddressbook/xxport/opie/opie_xxport.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/xxport/opie/opie_xxport.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/xxport/opie/opie_xxport.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kaddressbook/xxport/opie/opie_xxport.cpp b/kaddressbook/xxport/opie/opie_xxport.cpp
index db30d34..c9b0163 100644
--- a/kaddressbook/xxport/opie/opie_xxport.cpp
+++ b/kaddressbook/xxport/opie/opie_xxport.cpp
@@ -90,3 +90,3 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString
QString name = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml";
-
+
#ifndef KAB_EMBEDDED
@@ -96,5 +96,5 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString
#endif //KAB_EMBEDDED
-
+
if ( fileName.isEmpty() )
- return true;
+ return false;
@@ -102,3 +102,3 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString
OContactAccess* access = new OContactAccess("KA/Pi", 0l, backend, false);
-
+
if ( !access ) {
@@ -110,3 +110,3 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString
KABC::OpieConverter mConverter;
-
+
bool res = mConverter.init();
@@ -118,5 +118,5 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString
delete access;
- return false;
+ return false;
}
-
+
//Now check if the file has already entries, and ask the user if he wants to delete them first.
@@ -131,4 +131,4 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString
}
-
-
+
+
KABC::Addressee::List::ConstIterator it;
@@ -137,3 +137,3 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString
KABC::Addressee addressee = (*it);
-
+
res = mConverter.addresseeToOpie( *it, c );
@@ -150,3 +150,3 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString
}
-
+
access->save();
@@ -155,3 +155,3 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString
//US the deletion of the access object deletes the backend object as well.
-
+
return true;
@@ -162,5 +162,5 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const
KABC::AddresseeList adrlst;
-
+
QString name = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml";
-
+
#ifndef KAB_EMBEDDED
@@ -170,3 +170,3 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const
#endif //KAB_EMBEDDED
-
+
if ( fileName.isEmpty() )
@@ -176,3 +176,3 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const
OContactAccess* access = new OContactAccess("KA/Pi", 0l, backend, false);
-
+
if ( !access ) {
@@ -184,3 +184,3 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const
access -> setReadAhead( 32 ); // Use ReadAhead-Cache if available
-
+
KABC::OpieConverter mConverter;
@@ -196,4 +196,4 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const
}
-
-
+
+
OContactAccess::List::Iterator it;
@@ -203,7 +203,7 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const
OContact c = (*it);
-
+
KABC::Addressee addressee;
-
- res = mConverter.opieToAddressee( c, addressee );
-
+
+ res = mConverter.opieToAddressee( c, addressee );
+
if ( !addressee.isEmpty() && res ) {
@@ -211,11 +211,11 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const
}
-
+
// qDebug("found %s", c.fullName().latin1());
}
-
+
delete access;
//US the deletion of the access object deletes the backend object as well.
-
+
return adrlst;
-
+
}