Diffstat (limited to 'kaddressbook/xxport/opie/opie_xxport.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/xxport/opie/opie_xxport.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/kaddressbook/xxport/opie/opie_xxport.cpp b/kaddressbook/xxport/opie/opie_xxport.cpp index d1def18..8ee0725 100644 --- a/kaddressbook/xxport/opie/opie_xxport.cpp +++ b/kaddressbook/xxport/opie/opie_xxport.cpp @@ -106,8 +106,20 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString addressBook()->error( i18n( "Unable to access file '%1'." ).arg( fileName ) ); return false; } + KABC::OpieConverter mConverter; + + 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 false; + } + //Now check if the file has already entries, and ask the user if he wants to delete them first. OContactAccess::List contactList = access->allRecords(); if (contactList.count() > 0) { @@ -116,11 +128,9 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString // Clean the database.. access->clear(); } } - - KABC::OpieConverter mConverter; - bool res; + KABC::Addressee::List::ConstIterator it; for ( it = list.begin(); it != list.end(); ++it ) { OContact c; |