summaryrefslogtreecommitdiffstats
path: root/kabc/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'kabc/scripts')
-rw-r--r--kabc/scripts/entrylist2
-rw-r--r--kabc/scripts/field.src.cpp34
2 files changed, 8 insertions, 28 deletions
diff --git a/kabc/scripts/entrylist b/kabc/scripts/entrylist
index 7b9b324eb..40af0d0c2 100644
--- a/kabc/scripts/entrylist
+++ b/kabc/scripts/entrylist
@@ -29,7 +29,6 @@ ALFE,birthday,,QDateTime,birthday,Personal,.toString()
#Address address
LF,home address street,,QString,homeAddressStreet,Address|Personal
-LF,home address post office box,,QString,homeAddressPostOfficeBox,Address|Personal
LF,home address city,,QString,homeAddressLocality,Address|Personal
LF,home address state,,QString,homeAddressRegion,Address|Personal
LF,home address zip code,,QString,homeAddressPostalCode,Address|Personal
@@ -37,7 +36,6 @@ LF,home address country,,QString,homeAddressCountry,Address|Personal
LF,home address label,,QString,homeAddressLabel,Address|Personal
LF,business address street,,QString,businessAddressStreet,Address|Organization
-LF,business address post office box,,QString,businessAddressPostOfficeBox,Address|Organization
LF,business address city,,QString,businessAddressLocality,Address|Organization
LF,business address state,,QString,businessAddressRegion,Address|Organization
LF,business address zip code,,QString,businessAddressPostalCode,Address|Organization
diff --git a/kabc/scripts/field.src.cpp b/kabc/scripts/field.src.cpp
index 91a27779d..8a270f2d4 100644
--- a/kabc/scripts/field.src.cpp
+++ b/kabc/scripts/field.src.cpp
@@ -36,7 +36,7 @@ class Field::FieldImpl
const TQString &app = TQString::null )
: mFieldId( fieldId ), mCategory( category ), mLabel( label ),
mKey( key ), mApp( app ) {}
-
+
enum FieldId
{
CustomField,
@@ -45,11 +45,11 @@ class Field::FieldImpl
int fieldId() { return mFieldId; }
int category() { return mCategory; }
-
+
TQString label() { return mLabel; }
TQString key() { return mKey; }
TQString app() { return mApp; }
-
+
private:
int mFieldId;
int mCategory;
@@ -184,8 +184,6 @@ 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:
@@ -198,8 +196,6 @@ 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:
@@ -270,13 +266,6 @@ 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 );
@@ -319,13 +308,6 @@ 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 );
@@ -456,7 +438,7 @@ void Field::saveFields( KConfig *cfg, const TQString &identifier,
const Field::List &fields )
{
TQValueList<int> fieldIds;
-
+
int custom = 0;
Field::List::ConstIterator it;
for( it = fields.begin(); it != fields.end(); ++it ) {
@@ -470,7 +452,7 @@ void Field::saveFields( KConfig *cfg, const TQString &identifier,
TQString::number( custom++ ), customEntry );
}
}
-
+
cfg->writeEntry( identifier, fieldIds );
}
@@ -478,7 +460,7 @@ Field::List Field::restoreFields( const TQString &identifier )
{
KConfig *cfg = KGlobal::config();
KConfigGroupSaver( cfg, "KABCFields" );
-
+
return restoreFields( cfg, identifier );
}
@@ -503,7 +485,7 @@ Field::List Field::restoreFields( KConfig *cfg, const TQString &identifier )
}
fields.append( new Field( f ) );
}
-
+
return fields;
}
@@ -514,7 +496,7 @@ bool Field::equals( Field *field )
if ( !sameId ) return false;
if ( mImpl->fieldId() != FieldImpl::CustomField ) return true;
-
+
return mImpl->key() == field->mImpl->key();
}