From 259a7a50e4f8138cedfc2004fbde3b37cedcc49f Mon Sep 17 00:00:00 2001 From: ulf69 Date: Fri, 09 Jul 2004 08:05:25 +0000 Subject: support for export of categories und supression of empty fields --- (limited to 'kaddressbook/xxport') 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.
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 ) { 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 @@ -8,8 +8,9 @@ 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 -- cgit v0.9.0.2