summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/converter/qtopia/qtopiaconverter.cpp2
-rw-r--r--kaddressbook/xxport/opie/opie_xxport.cpp11
-rw-r--r--kaddressbook/xxport/qtopia/qtopia_xxport.cpp12
3 files changed, 22 insertions, 3 deletions
diff --git a/kabc/converter/qtopia/qtopiaconverter.cpp b/kabc/converter/qtopia/qtopiaconverter.cpp
index f451b8b..498e89e 100644
--- a/kabc/converter/qtopia/qtopiaconverter.cpp
+++ b/kabc/converter/qtopia/qtopiaconverter.cpp
@@ -203,13 +203,13 @@ bool QtopiaConverter::qtopiaToAddressee( const PimContact &contact, Addressee &a
else if (contact.gender() == PimContact::Female)
addr.insertCustom( "KADDRESSBOOK", "X-Gender", "female");
if (contact.anniversary().isValid()) {
QString dt = KGlobal::locale()->formatDate(contact.anniversary(), true, KLocale::ISODate);
//US
- qDebug("OpieConverter::qtopiaToAddressee found:%s", dt.latin1());
+// qDebug("QtopiaConverter::qtopiaToAddressee found:%s", dt.latin1());
addr.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt);
}
addr.insertCustom( "KADDRESSBOOK", "X-Children", contact.children() );
if (contact.birthday().isValid())
addr.setBirthday( contact.birthday() );
diff --git a/kaddressbook/xxport/opie/opie_xxport.cpp b/kaddressbook/xxport/opie/opie_xxport.cpp
index 12c83af..db30d34 100644
--- a/kaddressbook/xxport/opie/opie_xxport.cpp
+++ b/kaddressbook/xxport/opie/opie_xxport.cpp
@@ -181,14 +181,23 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const
return KABC::AddresseeList();
}
access -> setReadAhead( 32 ); // Use ReadAhead-Cache if available
KABC::OpieConverter mConverter;
- bool res = false;
+ bool res = mConverter.init();
+ if (!res)
+ {
+ QString text( i18n( "Unable to initialize opie converter.<br>Most likely a problem with the category file." ) );
+ qDebug(text);
+ KMessageBox::error( parentWidget(), text );
+ delete access;
+ return KABC::AddresseeList();
+ }
+
OContactAccess::List::Iterator it;
OContactAccess::List allList = access->allRecords();
for ( it = allList.begin(); it != allList.end(); ++it )
{
OContact c = (*it);
diff --git a/kaddressbook/xxport/qtopia/qtopia_xxport.cpp b/kaddressbook/xxport/qtopia/qtopia_xxport.cpp
index 3d830df..bf39fdb 100644
--- a/kaddressbook/xxport/qtopia/qtopia_xxport.cpp
+++ b/kaddressbook/xxport/qtopia/qtopia_xxport.cpp
@@ -160,14 +160,24 @@ KABC::AddresseeList QtopiaXXPort::importContacts( const QString& ) const
addressBook()->error( text );
KMessageBox::error( parentWidget(), text );
return KABC::AddresseeList();
}
KABC::QtopiaConverter mConverter;
- bool res = false;
+ bool res = mConverter.init();
+ if (!res)
+ {
+ QString text( i18n( "Unable to initialize qtopia converter.<br>Most likely a problem with the category file." ) );
+ qDebug(text);
+ KMessageBox::error( parentWidget(), text );
+ delete access;
+ return KABC::AddresseeList();
+ }
+
+
{ //create a new scope
AddressBookIterator it(*access);
for (it.toFirst(); it.current(); ++it) {
const PimContact*contact = it.current();