Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 2b853686 authored by Laurent Montel's avatar Laurent Montel 😁

Add KIND support (vcard4.0)

parent 062d7a64
......@@ -145,6 +145,7 @@ class Addressee::Private : public QSharedData
Email::List mEmails;
Lang::List mLangs;
Gender mGender;
QString mKind;
QStringList mCategories;
QMap<QString, QString> mCustomFields;
......@@ -364,6 +365,11 @@ bool Addressee::operator==( const Addressee &addressee ) const
kDebug() << "gender differs";
return false;
}
if ( d->mKind != addressee.d->mKind ) {
kDebug() << "kind differs";
return false;
}
return true;
}
......@@ -415,6 +421,20 @@ QString Addressee::nameLabel()
return i18n( "Name" );
}
void Addressee::setKind( const QString &kind )
{
if ( kind == d->mKind )
return;
d->mEmpty = false;
d->mKind = kind;
}
QString Addressee::kind() const
{
return d->mKind;
}
void Addressee::setFormattedName( const QString &formattedName )
{
......@@ -2017,6 +2037,7 @@ QDataStream &KABC::operator<<( QDataStream &s, const Addressee &a )
s << a.d->mKeys;
s << a.d->mLangs;
s << a.d->mGender;
s << a.d->mKind;
return s;
}
......@@ -2059,6 +2080,7 @@ QDataStream &KABC::operator>>( QDataStream &s, Addressee &a )
s >> a.d->mKeys;
s >> a.d->mLangs;
s >> a.d->mGender;
s >> a.d->mKind;
a.d->mEmpty = false;
return s;
......
......@@ -991,6 +991,8 @@ class KABC_EXPORT Addressee
void setGender(const KABC::Gender &gender);
KABC::Gender gender() const;
QString kind() const;
void setKind(const QString &kind);
private:
class Private;
QSharedDataPointer<Private> d;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment