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 @@ -107,6 +107,18 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString 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) @@ -117,9 +129,7 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString access->clear(); } } - - KABC::OpieConverter mConverter; - bool res; + KABC::Addressee::List::ConstIterator it; for ( it = list.begin(); it != list.end(); ++it ) { |