summaryrefslogtreecommitdiffabout
path: root/kabc
Unidiff
Diffstat (limited to 'kabc') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/converter/opie/opieconverter.h4
-rw-r--r--kabc/converter/qtopia/qtopiaconverter.cpp19
-rw-r--r--kabc/converter/qtopia/qtopiaconverter.h4
3 files changed, 12 insertions, 15 deletions
diff --git a/kabc/converter/opie/opieconverter.h b/kabc/converter/opie/opieconverter.h
index c7e691f..d251a24 100644
--- a/kabc/converter/opie/opieconverter.h
+++ b/kabc/converter/opie/opieconverter.h
@@ -48,14 +48,14 @@ public:
48 48
49 /** 49 /**
50 * Destructor. 50 * Destructor.
51 */ 51 */
52 virtual ~OpieConverter(); 52 virtual ~OpieConverter();
53 53
54 virtual bool init(); 54 bool init();
55 virtual void deinit(); 55 void deinit();
56 56
57 /** 57 /**
58 * Converts a vcard string to an addressee. 58 * Converts a vcard string to an addressee.
59 * 59 *
60 * @param contact The opie contact. 60 * @param contact The opie contact.
61 * @param addr The addressee. 61 * @param addr The addressee.
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
@@ -46,21 +46,18 @@ QtopiaConverter::~QtopiaConverter()
46 deinit(); 46 deinit();
47} 47}
48 48
49bool QtopiaConverter::init() 49bool QtopiaConverter::init()
50{ 50{
51 catDB = new Categories(); 51 catDB = new Categories();
52 if (catDB) 52
53 { 53 if (!catDB)
54 catDB->load( categoryFileName() );
55 return true;
56 }
57 else
58 {
59 return false; 54 return false;
60 } 55
56 catDB->load( categoryFileName() );
57 return true;
61} 58}
62 59
63void QtopiaConverter::deinit() 60void QtopiaConverter::deinit()
64{ 61{
65 if (catDB) 62 if (catDB)
66 { 63 {
@@ -206,13 +203,13 @@ bool QtopiaConverter::qtopiaToAddressee( const PimContact &contact, Addressee &a
206 else if (contact.gender() == PimContact::Female) 203 else if (contact.gender() == PimContact::Female)
207 addr.insertCustom( "KADDRESSBOOK", "X-Gender", "female"); 204 addr.insertCustom( "KADDRESSBOOK", "X-Gender", "female");
208 205
209 if (contact.anniversary().isValid()) { 206 if (contact.anniversary().isValid()) {
210 QString dt = KGlobal::locale()->formatDate(contact.anniversary(), true, KLocale::ISODate); 207 QString dt = KGlobal::locale()->formatDate(contact.anniversary(), true, KLocale::ISODate);
211//US 208//US
212 qDebug("OpieConverter::opieToAddressee found:%s", dt.latin1()); 209 qDebug("OpieConverter::qtopiaToAddressee found:%s", dt.latin1());
213 addr.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt); 210 addr.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt);
214 } 211 }
215 212
216 addr.insertCustom( "KADDRESSBOOK", "X-Children", contact.children() ); 213 addr.insertCustom( "KADDRESSBOOK", "X-Children", contact.children() );
217 if (contact.birthday().isValid()) 214 if (contact.birthday().isValid())
218 addr.setBirthday( contact.birthday() ); 215 addr.setBirthday( contact.birthday() );
@@ -227,22 +224,22 @@ bool QtopiaConverter::qtopiaToAddressee( const PimContact &contact, Addressee &a
227 addr.setNote( contact.notes() ); 224 addr.setNote( contact.notes() );
228 225
229 226
230 227
231//US QString groups() const { return find( Qtopia::Groups ); } 228//US QString groups() const { return find( Qtopia::Groups ); }
232//US QStringList groupList() const; 229//US QStringList groupList() const;
233 230
234 QArray<int> catArray = contact.categories(); 231 QArray<int> catArray = contact.categories();
235 QString cat; 232 QString cat;
236 233
237 for ( unsigned int i=0; i < catArray.size(); i++ ) { 234 for ( unsigned int i=0; i < catArray.size(); i++ ) {
238 cat = catDB->label("contact", catArray[i]); 235 cat = catDB->label("contact", catArray[i]);
239 if ( !cat.isEmpty() ) 236 if ( !cat.isEmpty() )
240 addr.insertCategory( cat ); 237 addr.insertCategory( cat );
241 } 238 }
242 239
243 return true; 240 return true;
244} 241}
245 242
246bool QtopiaConverter::addresseeToQtopia( const Addressee &addr, PimContact &contact ) 243bool QtopiaConverter::addresseeToQtopia( const Addressee &addr, PimContact &contact )
247{ 244{
248 // name 245 // name
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
@@ -47,14 +47,14 @@ public:
47 47
48 /** 48 /**
49 * Destructor. 49 * Destructor.
50 */ 50 */
51 virtual ~QtopiaConverter(); 51 virtual ~QtopiaConverter();
52 52
53 virtual bool init(); 53 bool init();
54 virtual void deinit(); 54 void deinit();
55 55
56 /** 56 /**
57 * Converts a vcard string to an addressee. 57 * Converts a vcard string to an addressee.
58 * 58 *
59 * @param contact The qtopia contact. 59 * @param contact The qtopia contact.
60 * @param addr The addressee. 60 * @param addr The addressee.