author | ulf69 <ulf69> | 2004-07-09 08:05:25 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-07-09 08:05:25 (UTC) |
commit | 259a7a50e4f8138cedfc2004fbde3b37cedcc49f (patch) (side-by-side diff) | |
tree | dfd2e89f169ba65ffd250f9b52f8f4efcd62d8b3 /kaddressbook | |
parent | d91c533ffc42d7bf48fa1326754894b2c30b6831 (diff) | |
download | kdepimpi-259a7a50e4f8138cedfc2004fbde3b37cedcc49f.zip kdepimpi-259a7a50e4f8138cedfc2004fbde3b37cedcc49f.tar.gz kdepimpi-259a7a50e4f8138cedfc2004fbde3b37cedcc49f.tar.bz2 |
support for export of categories und supression of empty fields
-rw-r--r-- | kaddressbook/xxport/opie/opie_xxport.cpp | 14 | ||||
-rw-r--r-- | kaddressbook/xxport/opie/opie_xxportE.pro | 3 |
2 files changed, 14 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 @@ -104,25 +104,35 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString if ( !access ) { qDebug("Unable to access file() %s", fileName.latin1()); 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) { QString text( i18n( "Do you want to remove<br>all existing entries from<br>%1<br>before exporting.?" ) ); if ( KMessageBox::questionYesNo( parentWidget(), text.arg( fileName ) ) == KMessageBox::Yes ) { // 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; KABC::Addressee addressee = (*it); diff --git a/kaddressbook/xxport/opie/opie_xxportE.pro b/kaddressbook/xxport/opie/opie_xxportE.pro index a660a48..c373e37 100644 --- a/kaddressbook/xxport/opie/opie_xxportE.pro +++ b/kaddressbook/xxport/opie/opie_xxportE.pro @@ -5,14 +5,15 @@ TARGET = kaddrbk_opie_xxport OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib DEFINES += KAB_EMBEDDED -INCLUDEPATH += ../.. ../../.. ../../../kabc ../../../kabc/converter/opie ../../../microkde ../../../microkde/kdeui ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../qtcompat $(QPEDIR)/include +INCLUDEPATH += ../.. ../../.. ../../../kabc ../../../kabc/converter/opie ../../../microkde ../../../microkde/kdeui ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../qtcompat $(OPIEDIR)/include LIBS += -L$(QPEDIR)/lib +LIBS += -L$(OPIEDIR)/lib LIBS += -lmicrokde LIBS += -lmicrokabc LIBS += -lopie LIBS += -lqpe LIBS += -lqte LIBS += -lmicrokabc_opieconverter |