-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp index f3b6d56..0ffbb67 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp +++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp @@ -453,4 +453,9 @@ VObject* OPimContactAccessBackend_VCard::createVObject( const OPimContact &c ) // home properties + if ( !( c.homeStreet().isEmpty() + && c.homeCity().isEmpty() + && c.homeState().isEmpty() + && c.homeZip().isEmpty() + && c.homeCountry().isEmpty() ) ){ VObject *home_adr= safeAddProp( vcard, VCAdrProp ); safeAddProp( home_adr, VCHomeProp ); @@ -460,4 +465,5 @@ VObject* OPimContactAccessBackend_VCard::createVObject( const OPimContact &c ) safeAddPropValue( home_adr, VCPostalCodeProp, c.homeZip() ); safeAddPropValue( home_adr, VCCountryNameProp, c.homeCountry() ); + } VObject *home_phone = safeAddPropValue( vcard, VCTelephoneProp, c.homePhone() ); @@ -474,4 +480,9 @@ VObject* OPimContactAccessBackend_VCard::createVObject( const OPimContact &c ) // work properties + if ( !( c.businessStreet().isEmpty() + && c.businessCity().isEmpty() + && c.businessState().isEmpty() + && c.businessZip().isEmpty() + && c.businessCountry().isEmpty() ) ){ VObject *work_adr= safeAddProp( vcard, VCAdrProp ); safeAddProp( work_adr, VCWorkProp ); @@ -481,4 +492,5 @@ VObject* OPimContactAccessBackend_VCard::createVObject( const OPimContact &c ) safeAddPropValue( work_adr, VCPostalCodeProp, c.businessZip() ); safeAddPropValue( work_adr, VCCountryNameProp, c.businessCountry() ); + } VObject *work_phone = safeAddPropValue( vcard, VCTelephoneProp, c.businessPhone() ); |