diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-10-07 16:38:40 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-12-23 02:22:53 +0100 |
commit | 7b2644a96593d3abcb570e47459102fde9c18fb7 (patch) | |
tree | 2e2c7f03c7f3d75419a4496ed6aee36390260edd | |
parent | ee03f1004a410962813a494b2876e0e58b17140f (diff) | |
download | tdelibs-7b2644a96593d3abcb570e47459102fde9c18fb7.tar.gz tdelibs-7b2644a96593d3abcb570e47459102fde9c18fb7.zip |
Add the following patch from Bug 1499
tdelibs: add postofficebox suppot in tdeabc
(cherry picked from commit c1098677d4c3f93108a3a0d9dd56388f887416c8)
-rw-r--r-- | kabc/scripts/entrylist | 2 | ||||
-rw-r--r-- | kabc/scripts/field.src.cpp | 18 |
2 files changed, 20 insertions, 0 deletions
diff --git a/kabc/scripts/entrylist b/kabc/scripts/entrylist index 87c342a06..c48124162 100644 --- a/kabc/scripts/entrylist +++ b/kabc/scripts/entrylist @@ -29,6 +29,7 @@ ALFE,birthday,,TQDateTime,birthday,Personal,.toString() #Address address LF,home address street,,TQString,homeAddressStreet,Address|Personal +LF,home address post office box,,TQString,homeAddressPostOfficeBox,Address|Personal LF,home address city,,TQString,homeAddressLocality,Address|Personal LF,home address state,,TQString,homeAddressRegion,Address|Personal LF,home address zip code,,TQString,homeAddressPostalCode,Address|Personal @@ -36,6 +37,7 @@ LF,home address country,,TQString,homeAddressCountry,Address|Personal LF,home address label,,TQString,homeAddressLabel,Address|Personal LF,business address street,,TQString,businessAddressStreet,Address|Organization +LF,business address post office box,,TQString,businessAddressPostOfficeBox,Address|Organization LF,business address city,,TQString,businessAddressLocality,Address|Organization LF,business address state,,TQString,businessAddressRegion,Address|Organization LF,business address zip code,,TQString,businessAddressPostalCode,Address|Organization diff --git a/kabc/scripts/field.src.cpp b/kabc/scripts/field.src.cpp index 5291303f5..1fb786455 100644 --- a/kabc/scripts/field.src.cpp +++ b/kabc/scripts/field.src.cpp @@ -184,6 +184,8 @@ TQString Field::value( const KABC::Addressee &a ) return a.phoneNumber( PhoneNumber::Pager ).number(); case FieldImpl::HomeAddressStreet: return a.address( Address::Home ).street(); + case FieldImpl::HomeAddressPostOfficeBox: + return a.address( Address::Home ).postOfficeBox(); case FieldImpl::HomeAddressLocality: return a.address( Address::Home ).locality(); case FieldImpl::HomeAddressRegion: @@ -196,6 +198,8 @@ TQString Field::value( const KABC::Addressee &a ) return a.address( Address::Home ).label(); case FieldImpl::BusinessAddressStreet: return a.address( Address::Work ).street(); + case FieldImpl::BusinessAddressPostOfficeBox: + return a.address( Address::Work ).postOfficeBox(); case FieldImpl::BusinessAddressLocality: return a.address( Address::Work ).locality(); case FieldImpl::BusinessAddressRegion: @@ -266,6 +270,13 @@ bool Field::setValue( KABC::Addressee &a, const TQString &value ) a.insertAddress( address ); return true; } + case FieldImpl::HomeAddressPostOfficeBox: + { + KABC::Address address = a.address( Address::Home ); + address.setPostOfficeBox( value ); + a.insertAddress( address ); + return true; + } case FieldImpl::HomeAddressLocality: { KABC::Address address = a.address( Address::Home ); @@ -308,6 +319,13 @@ bool Field::setValue( KABC::Addressee &a, const TQString &value ) a.insertAddress( address ); return true; } + case FieldImpl::BusinessAddressPostOfficeBox: + { + KABC::Address address = a.address( Address::Work ); + address.setPostOfficeBox( value ); + a.insertAddress( address ); + return true; + } case FieldImpl::BusinessAddressLocality: { KABC::Address address = a.address( Address::Work ); |