summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:59:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:59:34 +0000
commit0cebafdea768e0e7716a3e7e8c8b0198f03bc53e (patch)
treef97382a95104b0ba76216b97633140a5607f3531
parent59521cce7025f18061b6e6c1cd2a4e82f38ea271 (diff)
downloadtdelibs-0cebafdea768e0e7716a3e7e8c8b0198f03bc53e.tar.gz
tdelibs-0cebafdea768e0e7716a3e7e8c8b0198f03bc53e.zip
* Synchronized with enterprise branch
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1170467 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--LAST_ENTERPRISE_SYNC1
-rw-r--r--kabc/scripts/entrylist2
-rw-r--r--kabc/scripts/field.src.cpp34
3 files changed, 9 insertions, 28 deletions
diff --git a/LAST_ENTERPRISE_SYNC b/LAST_ENTERPRISE_SYNC
new file mode 100644
index 000000000..2e52917a0
--- /dev/null
+++ b/LAST_ENTERPRISE_SYNC
@@ -0,0 +1 @@
+Revision 1170137
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();
}