From f2779e5e7742103ce848ab11e6b9fe3661587f0b Mon Sep 17 00:00:00 2001 From: ulf69 Date: Wed, 14 Jul 2004 14:55:56 +0000 Subject: added changes to support qtopia import/export and improved resource support --- (limited to 'kabc/converter/qtopia') diff --git a/kabc/converter/qtopia/qtopiaconverter.cpp b/kabc/converter/qtopia/qtopiaconverter.cpp index e3dd3e6..f451b8b 100644 --- a/kabc/converter/qtopia/qtopiaconverter.cpp +++ b/kabc/converter/qtopia/qtopiaconverter.cpp @@ -49,15 +49,12 @@ QtopiaConverter::~QtopiaConverter() bool QtopiaConverter::init() { catDB = new Categories(); - if (catDB) - { - catDB->load( categoryFileName() ); - return true; - } - else - { + + if (!catDB) return false; - } + + catDB->load( categoryFileName() ); + return true; } void QtopiaConverter::deinit() @@ -209,7 +206,7 @@ bool QtopiaConverter::qtopiaToAddressee( const PimContact &contact, Addressee &a if (contact.anniversary().isValid()) { QString dt = KGlobal::locale()->formatDate(contact.anniversary(), true, KLocale::ISODate); //US - qDebug("OpieConverter::opieToAddressee found:%s", dt.latin1()); + qDebug("OpieConverter::qtopiaToAddressee found:%s", dt.latin1()); addr.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt); } @@ -230,7 +227,7 @@ bool QtopiaConverter::qtopiaToAddressee( const PimContact &contact, Addressee &a //US QString groups() const { return find( Qtopia::Groups ); } //US QStringList groupList() const; - + QArray catArray = contact.categories(); QString cat; @@ -239,7 +236,7 @@ bool QtopiaConverter::qtopiaToAddressee( const PimContact &contact, Addressee &a if ( !cat.isEmpty() ) addr.insertCategory( cat ); } - + return true; } diff --git a/kabc/converter/qtopia/qtopiaconverter.h b/kabc/converter/qtopia/qtopiaconverter.h index 7397113..8f4c698 100644 --- a/kabc/converter/qtopia/qtopiaconverter.h +++ b/kabc/converter/qtopia/qtopiaconverter.h @@ -50,8 +50,8 @@ public: */ virtual ~QtopiaConverter(); - virtual bool init(); - virtual void deinit(); + bool init(); + void deinit(); /** * Converts a vcard string to an addressee. -- cgit v0.9.0.2