-rw-r--r-- | kabc/addressee.cpp | 17 | ||||
-rw-r--r-- | kabc/addressee.h | 3 | ||||
-rw-r--r-- | kabc/field.cpp | 6 |
3 files changed, 0 insertions, 26 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 7f592e9..155ce24 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp | |||
@@ -51,7 +51,6 @@ struct Addressee::AddresseeData : public KShared | |||
51 | QString uid; | 51 | QString uid; |
52 | QString name; | 52 | QString name; |
53 | QString formattedName; | 53 | QString formattedName; |
54 | QString defaultFormattedName; | ||
55 | QString familyName; | 54 | QString familyName; |
56 | QString givenName; | 55 | QString givenName; |
57 | QString additionalName; | 56 | QString additionalName; |
@@ -748,33 +747,17 @@ void Addressee::setFormattedName( const QString &formattedName ) | |||
748 | mData->empty = false; | 747 | mData->empty = false; |
749 | mData->formattedName = formattedName; | 748 | mData->formattedName = formattedName; |
750 | } | 749 | } |
751 | void Addressee::setDefaultFormattedName( const QString &formattedName ) | ||
752 | { | ||
753 | if ( formattedName == mData->defaultFormattedName ) return; | ||
754 | detach(); | ||
755 | mData->empty = false; | ||
756 | mData->defaultFormattedName = formattedName; | ||
757 | } | ||
758 | 750 | ||
759 | QString Addressee::formattedName() const | 751 | QString Addressee::formattedName() const |
760 | { | 752 | { |
761 | return mData->formattedName; | 753 | return mData->formattedName; |
762 | } | 754 | } |
763 | QString Addressee::defaultFormattedName() const | ||
764 | { | ||
765 | return mData->defaultFormattedName; | ||
766 | } | ||
767 | 755 | ||
768 | QString Addressee::formattedNameLabel() | 756 | QString Addressee::formattedNameLabel() |
769 | { | 757 | { |
770 | return i18n("Formatted Name"); | 758 | return i18n("Formatted Name"); |
771 | } | 759 | } |
772 | 760 | ||
773 | QString Addressee::defaultFormattedNameLabel() | ||
774 | { | ||
775 | return i18n("Def.Formatted Name"); | ||
776 | } | ||
777 | |||
778 | 761 | ||
779 | void Addressee::setFamilyName( const QString &familyName ) | 762 | void Addressee::setFamilyName( const QString &familyName ) |
780 | { | 763 | { |
diff --git a/kabc/addressee.h b/kabc/addressee.h index 0d688f8..a2fbcf5 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h | |||
@@ -154,17 +154,14 @@ class Addressee | |||
154 | Set formatted name. | 154 | Set formatted name. |
155 | */ | 155 | */ |
156 | void setFormattedName( const QString &formattedName ); | 156 | void setFormattedName( const QString &formattedName ); |
157 | void setDefaultFormattedName( const QString &formattedName ); | ||
158 | /** | 157 | /** |
159 | Return formatted name. | 158 | Return formatted name. |
160 | */ | 159 | */ |
161 | QString formattedName() const; | 160 | QString formattedName() const; |
162 | QString defaultFormattedName() const; | ||
163 | /** | 161 | /** |
164 | Return translated label for formattedName field. | 162 | Return translated label for formattedName field. |
165 | */ | 163 | */ |
166 | static QString formattedNameLabel(); | 164 | static QString formattedNameLabel(); |
167 | static QString defaultFormattedNameLabel(); | ||
168 | 165 | ||
169 | /** | 166 | /** |
170 | Set family name. | 167 | Set family name. |
diff --git a/kabc/field.cpp b/kabc/field.cpp index 5c561c3..fd51026 100644 --- a/kabc/field.cpp +++ b/kabc/field.cpp | |||
@@ -87,7 +87,6 @@ class Field::FieldImpl | |||
87 | Url, | 87 | Url, |
88 | Resource, | 88 | Resource, |
89 | Sip, | 89 | Sip, |
90 | DefaultFormattedName, | ||
91 | MobileWorkPhone, | 90 | MobileWorkPhone, |
92 | MobileHomePhone | 91 | MobileHomePhone |
93 | }; | 92 | }; |
@@ -129,8 +128,6 @@ QString Field::label() | |||
129 | switch ( mImpl->fieldId() ) { | 128 | switch ( mImpl->fieldId() ) { |
130 | case FieldImpl::FormattedName: | 129 | case FieldImpl::FormattedName: |
131 | return Addressee::formattedNameLabel(); | 130 | return Addressee::formattedNameLabel(); |
132 | case FieldImpl::DefaultFormattedName: | ||
133 | return Addressee::defaultFormattedNameLabel(); | ||
134 | case FieldImpl::FamilyName: | 131 | case FieldImpl::FamilyName: |
135 | return Addressee::familyNameLabel(); | 132 | return Addressee::familyNameLabel(); |
136 | case FieldImpl::GivenName: | 133 | case FieldImpl::GivenName: |
@@ -248,8 +245,6 @@ QString Field::value( const KABC::Addressee &a ) | |||
248 | switch ( mImpl->fieldId() ) { | 245 | switch ( mImpl->fieldId() ) { |
249 | case FieldImpl::FormattedName: | 246 | case FieldImpl::FormattedName: |
250 | return a.formattedName(); | 247 | return a.formattedName(); |
251 | case FieldImpl::DefaultFormattedName: | ||
252 | return a.defaultFormattedName(); | ||
253 | case FieldImpl::FamilyName: | 248 | case FieldImpl::FamilyName: |
254 | return a.familyName(); | 249 | return a.familyName(); |
255 | case FieldImpl::GivenName: | 250 | case FieldImpl::GivenName: |
@@ -408,7 +403,6 @@ Field::List Field::allFields() | |||
408 | { | 403 | { |
409 | if ( mAllFields.isEmpty() ) { | 404 | if ( mAllFields.isEmpty() ) { |
410 | createField( FieldImpl::FormattedName, Frequent ); | 405 | createField( FieldImpl::FormattedName, Frequent ); |
411 | createField( FieldImpl::DefaultFormattedName, Frequent ); | ||
412 | createField( FieldImpl::FamilyName, Frequent ); | 406 | createField( FieldImpl::FamilyName, Frequent ); |
413 | createField( FieldImpl::GivenName, Frequent ); | 407 | createField( FieldImpl::GivenName, Frequent ); |
414 | createField( FieldImpl::AdditionalName ); | 408 | createField( FieldImpl::AdditionalName ); |