summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/ocontactaccessbackend_vcard.cpp20
-rw-r--r--libopie/pim/otodoaccessvcal.cpp7
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp20
-rw-r--r--libopie2/opiepim/backend/otodoaccessvcal.cpp7
4 files changed, 46 insertions, 8 deletions
diff --git a/libopie/pim/ocontactaccessbackend_vcard.cpp b/libopie/pim/ocontactaccessbackend_vcard.cpp
index 1dc6b48..622d40a 100644
--- a/libopie/pim/ocontactaccessbackend_vcard.cpp
+++ b/libopie/pim/ocontactaccessbackend_vcard.cpp
@@ -14,12 +14,27 @@
14 * 14 *
15 * ===================================================================== 15 * =====================================================================
16 * Version: $Id$ 16 * Version: $Id$
17 * ===================================================================== 17 * =====================================================================
18 * History: 18 * History:
19 * $Log$ 19 * $Log$
20 * Revision 1.7 2003/02/16 22:25:46 zecke
21 * 0000276 Fix for that bug.. or better temp workaround
22 * A Preferred Number is HOME|VOICE
23 * A CellPhone is HOME|VOICE|CELL the type & HOME|VOICE test
24 * triggers both
25 * and the cell phone number overrides the other entries..
26 *
27 * as a temp I check that it's not equal to HOME|VOICE|CELL before setting the
28 * number
29 *
30 * The right and final fix would be to reorder the if statement to make it
31 * if else based and the less common thing put to the bottom
32 *
33 * OTodoAccessVcal fix the date for beaming
34 *
20 * Revision 1.6 2003/01/13 15:49:31 eilers 35 * Revision 1.6 2003/01/13 15:49:31 eilers
21 * Fixing crash when businesscard.vcf is missing.. 36 * Fixing crash when businesscard.vcf is missing..
22 * 37 *
23 * Revision 1.5 2002/12/07 13:26:22 eilers 38 * Revision 1.5 2002/12/07 13:26:22 eilers
24 * Fixing bug in storing anniversary.. 39 * Fixing bug in storing anniversary..
25 * 40 *
@@ -312,19 +327,20 @@ OContact OContactAccessBackend_VCard::parseVObject( VObject *obj )
312 if ( (type & UNKNOWN) != UNKNOWN ) { 327 if ( (type & UNKNOWN) != UNKNOWN ) {
313 if ( ( type & (HOME|WORK) ) == 0 ) // default 328 if ( ( type & (HOME|WORK) ) == 0 ) // default
314 type |= HOME; 329 type |= HOME;
315 if ( ( type & (VOICE|CELL|FAX|PAGER) ) == 0 ) // default 330 if ( ( type & (VOICE|CELL|FAX|PAGER) ) == 0 ) // default
316 type |= VOICE; 331 type |= VOICE;
317 332
318 if ( (type & (VOICE|HOME) ) == (VOICE|HOME) ) 333 qWarning("value %s %d", value.data(), type );
334 if ( (type & (VOICE|HOME) ) == (VOICE|HOME) && (type & (CELL|HOME) ) != (CELL|HOME) )
319 c.setHomePhone( value ); 335 c.setHomePhone( value );
320 if ( ( type & (FAX|HOME) ) == (FAX|HOME) ) 336 if ( ( type & (FAX|HOME) ) == (FAX|HOME) )
321 c.setHomeFax( value ); 337 c.setHomeFax( value );
322 if ( ( type & (CELL|HOME) ) == (CELL|HOME) ) 338 if ( ( type & (CELL|HOME) ) == (CELL|HOME) )
323 c.setHomeMobile( value ); 339 c.setHomeMobile( value );
324 if ( ( type & (VOICE|WORK) ) == (VOICE|WORK) ) 340 if ( ( type & (VOICE|WORK) ) == (VOICE|WORK) && (type & (CELL|WORK) ) != (CELL|WORK) )
325 c.setBusinessPhone( value ); 341 c.setBusinessPhone( value );
326 if ( ( type & (FAX|WORK) ) == (FAX|WORK) ) 342 if ( ( type & (FAX|WORK) ) == (FAX|WORK) )
327 c.setBusinessFax( value ); 343 c.setBusinessFax( value );
328 if ( ( type & (CELL|WORK) ) == (CELL|WORK) ) 344 if ( ( type & (CELL|WORK) ) == (CELL|WORK) )
329 c.setBusinessMobile( value ); 345 c.setBusinessMobile( value );
330 if ( ( type & (PAGER|WORK) ) == (PAGER|WORK) ) 346 if ( ( type & (PAGER|WORK) ) == (PAGER|WORK) )
diff --git a/libopie/pim/otodoaccessvcal.cpp b/libopie/pim/otodoaccessvcal.cpp
index e96cc3c..309f9e1 100644
--- a/libopie/pim/otodoaccessvcal.cpp
+++ b/libopie/pim/otodoaccessvcal.cpp
@@ -55,15 +55,18 @@ namespace {
55 }; 55 };
56 static VObject *vobjByEvent( const OTodo &event ) { 56 static VObject *vobjByEvent( const OTodo &event ) {
57 VObject *task = newVObject( VCTodoProp ); 57 VObject *task = newVObject( VCTodoProp );
58 if( task == 0 ) 58 if( task == 0 )
59 return 0l; 59 return 0l;
60 60
61 if( event.hasDueDate() ) 61 if( event.hasDueDate() ) {
62 QTime time(0, 0, 0);
63 QDateTime date(event.dueDate(), time );
62 addPropValue( task, VCDueProp, 64 addPropValue( task, VCDueProp,
63 TimeConversion::toISO8601( event.dueDate() ) ); 65 TimeConversion::toISO8601( date ) );
66 }
64 67
65 if( event.isCompleted() ) 68 if( event.isCompleted() )
66 addPropValue( task, VCStatusProp, "COMPLETED"); 69 addPropValue( task, VCStatusProp, "COMPLETED");
67 70
68 QString string = QString::number(event.priority() ); 71 QString string = QString::number(event.priority() );
69 addPropValue( task, VCPriorityProp, string.local8Bit() ); 72 addPropValue( task, VCPriorityProp, string.local8Bit() );
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
index 1dc6b48..622d40a 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
@@ -14,12 +14,27 @@
14 * 14 *
15 * ===================================================================== 15 * =====================================================================
16 * Version: $Id$ 16 * Version: $Id$
17 * ===================================================================== 17 * =====================================================================
18 * History: 18 * History:
19 * $Log$ 19 * $Log$
20 * Revision 1.7 2003/02/16 22:25:46 zecke
21 * 0000276 Fix for that bug.. or better temp workaround
22 * A Preferred Number is HOME|VOICE
23 * A CellPhone is HOME|VOICE|CELL the type & HOME|VOICE test
24 * triggers both
25 * and the cell phone number overrides the other entries..
26 *
27 * as a temp I check that it's not equal to HOME|VOICE|CELL before setting the
28 * number
29 *
30 * The right and final fix would be to reorder the if statement to make it
31 * if else based and the less common thing put to the bottom
32 *
33 * OTodoAccessVcal fix the date for beaming
34 *
20 * Revision 1.6 2003/01/13 15:49:31 eilers 35 * Revision 1.6 2003/01/13 15:49:31 eilers
21 * Fixing crash when businesscard.vcf is missing.. 36 * Fixing crash when businesscard.vcf is missing..
22 * 37 *
23 * Revision 1.5 2002/12/07 13:26:22 eilers 38 * Revision 1.5 2002/12/07 13:26:22 eilers
24 * Fixing bug in storing anniversary.. 39 * Fixing bug in storing anniversary..
25 * 40 *
@@ -312,19 +327,20 @@ OContact OContactAccessBackend_VCard::parseVObject( VObject *obj )
312 if ( (type & UNKNOWN) != UNKNOWN ) { 327 if ( (type & UNKNOWN) != UNKNOWN ) {
313 if ( ( type & (HOME|WORK) ) == 0 ) // default 328 if ( ( type & (HOME|WORK) ) == 0 ) // default
314 type |= HOME; 329 type |= HOME;
315 if ( ( type & (VOICE|CELL|FAX|PAGER) ) == 0 ) // default 330 if ( ( type & (VOICE|CELL|FAX|PAGER) ) == 0 ) // default
316 type |= VOICE; 331 type |= VOICE;
317 332
318 if ( (type & (VOICE|HOME) ) == (VOICE|HOME) ) 333 qWarning("value %s %d", value.data(), type );
334 if ( (type & (VOICE|HOME) ) == (VOICE|HOME) && (type & (CELL|HOME) ) != (CELL|HOME) )
319 c.setHomePhone( value ); 335 c.setHomePhone( value );
320 if ( ( type & (FAX|HOME) ) == (FAX|HOME) ) 336 if ( ( type & (FAX|HOME) ) == (FAX|HOME) )
321 c.setHomeFax( value ); 337 c.setHomeFax( value );
322 if ( ( type & (CELL|HOME) ) == (CELL|HOME) ) 338 if ( ( type & (CELL|HOME) ) == (CELL|HOME) )
323 c.setHomeMobile( value ); 339 c.setHomeMobile( value );
324 if ( ( type & (VOICE|WORK) ) == (VOICE|WORK) ) 340 if ( ( type & (VOICE|WORK) ) == (VOICE|WORK) && (type & (CELL|WORK) ) != (CELL|WORK) )
325 c.setBusinessPhone( value ); 341 c.setBusinessPhone( value );
326 if ( ( type & (FAX|WORK) ) == (FAX|WORK) ) 342 if ( ( type & (FAX|WORK) ) == (FAX|WORK) )
327 c.setBusinessFax( value ); 343 c.setBusinessFax( value );
328 if ( ( type & (CELL|WORK) ) == (CELL|WORK) ) 344 if ( ( type & (CELL|WORK) ) == (CELL|WORK) )
329 c.setBusinessMobile( value ); 345 c.setBusinessMobile( value );
330 if ( ( type & (PAGER|WORK) ) == (PAGER|WORK) ) 346 if ( ( type & (PAGER|WORK) ) == (PAGER|WORK) )
diff --git a/libopie2/opiepim/backend/otodoaccessvcal.cpp b/libopie2/opiepim/backend/otodoaccessvcal.cpp
index e96cc3c..309f9e1 100644
--- a/libopie2/opiepim/backend/otodoaccessvcal.cpp
+++ b/libopie2/opiepim/backend/otodoaccessvcal.cpp
@@ -55,15 +55,18 @@ namespace {
55 }; 55 };
56 static VObject *vobjByEvent( const OTodo &event ) { 56 static VObject *vobjByEvent( const OTodo &event ) {
57 VObject *task = newVObject( VCTodoProp ); 57 VObject *task = newVObject( VCTodoProp );
58 if( task == 0 ) 58 if( task == 0 )
59 return 0l; 59 return 0l;
60 60
61 if( event.hasDueDate() ) 61 if( event.hasDueDate() ) {
62 QTime time(0, 0, 0);
63 QDateTime date(event.dueDate(), time );
62 addPropValue( task, VCDueProp, 64 addPropValue( task, VCDueProp,
63 TimeConversion::toISO8601( event.dueDate() ) ); 65 TimeConversion::toISO8601( date ) );
66 }
64 67
65 if( event.isCompleted() ) 68 if( event.isCompleted() )
66 addPropValue( task, VCStatusProp, "COMPLETED"); 69 addPropValue( task, VCStatusProp, "COMPLETED");
67 70
68 QString string = QString::number(event.priority() ); 71 QString string = QString::number(event.priority() );
69 addPropValue( task, VCPriorityProp, string.local8Bit() ); 72 addPropValue( task, VCPriorityProp, string.local8Bit() );