From 65b8479039ca52f3f7ad8a36c616f1d8a4ffbaec Mon Sep 17 00:00:00 2001 From: ulf69 Date: Tue, 13 Jul 2004 04:26:58 +0000 Subject: removed dead code from opiconverter --- diff --git a/kabc/converter/opie/opieconverter.cpp b/kabc/converter/opie/opieconverter.cpp index b4e9f1c..0b6a55e 100644 --- a/kabc/converter/opie/opieconverter.cpp +++ b/kabc/converter/opie/opieconverter.cpp @@ -70,7 +70,7 @@ void OpieConverter::deinit() } } -bool OpieConverter::opieToAddressee( OContact &contact, Addressee &addr ) +bool OpieConverter::opieToAddressee( const OContact &contact, Addressee &addr ) { // name addr.setFormattedName(contact.fileAs()); @@ -229,15 +229,11 @@ bool OpieConverter::opieToAddressee( OContact &contact, Addressee &addr ) QStringList cats = contact.categoryNames("Contacts"); + addr.setCategories( cats ); // for ( QStringList::Iterator it = cats.begin(); it != cats.end(); ++it ) { // qDebug("Cat: %s", (*it).latin1()); // } - - addr.setCategories( contact.categoryNames("Contacts") ); -// qDebug("Groups: %s", contact.groups().latin1()); -// addr.setCategories( contact.groupList() ); - return true; } @@ -340,34 +336,11 @@ bool OpieConverter::addresseeToOpie( const Addressee &addr, OContact &contact ) //US QString groups() const { return find( Qtopia::Groups ); } //US QStringList groupList() const; -/*US - QStringList cats = contact.categoryNames("Contacts"); - for ( QStringList::Iterator it = cats.begin(); it != cats.end(); ++it ) { - qDebug("Cat: %s", (*it).latin1()); - } -*/ - -// addr.setCategories( contact.categoryNames("Contacts") ); -// contact.categoryNames("Contacts"); -// contact.setCategoryNames(addr.categories()); - -/*US - QStringList cats = addr.categories(); - QArray cat(cats.count()); - int counter = 0; - for ( QStringList::ConstIterator it = cats.begin(); it != cats.end(); ++it ) - cat[counter] = (*it).toInt(); - - contact.setCategories( cat ); -*/ - - Categories catDB; - catDB.load( categoryFileName() ); QStringList cats = addr.categories(); QArray iar; if ( !cats.isEmpty() ) { - QArray iar = catDB.ids("contact", cats); + QArray iar = catDB->ids("contact", cats); contact.setCategories(iar); } diff --git a/kabc/converter/opie/opieconverter.h b/kabc/converter/opie/opieconverter.h index 7d2ad85..c7e691f 100644 --- a/kabc/converter/opie/opieconverter.h +++ b/kabc/converter/opie/opieconverter.h @@ -60,7 +60,7 @@ public: * @param contact The opie contact. * @param addr The addressee. */ - bool opieToAddressee( OContact &contact, Addressee &addr ); + bool opieToAddressee( const OContact &contact, Addressee &addr ); /** * Converts an addressee to a vcard string. -- cgit v0.9.0.2