Diffstat (limited to 'kabc/converter/qtopia/qtopiaconverter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/converter/qtopia/qtopiaconverter.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
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 @@ -48,17 +48,14 @@ 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() { @@ -208,9 +205,9 @@ 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); } addr.insertCustom( "KADDRESSBOOK", "X-Children", contact.children() ); @@ -229,18 +226,18 @@ bool QtopiaConverter::qtopiaToAddressee( const PimContact &contact, Addressee &a //US QString groups() const { return find( Qtopia::Groups ); } //US QStringList groupList() const; - + QArray<int> catArray = contact.categories(); QString cat; for ( unsigned int i=0; i < catArray.size(); i++ ) { cat = catDB->label("contact", catArray[i]); if ( !cat.isEmpty() ) addr.insertCategory( cat ); } - + return true; } bool QtopiaConverter::addresseeToQtopia( const Addressee &addr, PimContact &contact ) |