-rw-r--r-- | kabc/addressee.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index eec0f1f..3ce733d 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp | |||
@@ -1967,64 +1967,68 @@ void Addressee::parseEmailAddress( const QString &rawEmail, QString &fullName, | |||
1967 | // grab the email part | 1967 | // grab the email part |
1968 | email = rawEmail.mid(startPos+1, endPos-startPos-1).stripWhiteSpace(); | 1968 | email = rawEmail.mid(startPos+1, endPos-startPos-1).stripWhiteSpace(); |
1969 | 1969 | ||
1970 | // Check that we do not have any extra characters on the end of the | 1970 | // Check that we do not have any extra characters on the end of the |
1971 | // strings | 1971 | // strings |
1972 | len = fullName.length(); | 1972 | len = fullName.length(); |
1973 | if (fullName[0]=='"' && fullName[len-1]=='"') | 1973 | if (fullName[0]=='"' && fullName[len-1]=='"') |
1974 | fullName = fullName.mid(1, len-2); | 1974 | fullName = fullName.mid(1, len-2); |
1975 | else if (fullName[0]=='<' && fullName[len-1]=='>') | 1975 | else if (fullName[0]=='<' && fullName[len-1]=='>') |
1976 | fullName = fullName.mid(1, len-2); | 1976 | fullName = fullName.mid(1, len-2); |
1977 | else if (fullName[0]=='(' && fullName[len-1]==')') | 1977 | else if (fullName[0]=='(' && fullName[len-1]==')') |
1978 | fullName = fullName.mid(1, len-2); | 1978 | fullName = fullName.mid(1, len-2); |
1979 | } | 1979 | } |
1980 | } | 1980 | } |
1981 | } | 1981 | } |
1982 | 1982 | ||
1983 | void Addressee::setResource( Resource *resource ) | 1983 | void Addressee::setResource( Resource *resource ) |
1984 | { | 1984 | { |
1985 | detach(); | 1985 | detach(); |
1986 | mData->resource = resource; | 1986 | mData->resource = resource; |
1987 | } | 1987 | } |
1988 | 1988 | ||
1989 | Resource *Addressee::resource() const | 1989 | Resource *Addressee::resource() const |
1990 | { | 1990 | { |
1991 | return mData->resource; | 1991 | return mData->resource; |
1992 | } | 1992 | } |
1993 | 1993 | ||
1994 | //US | 1994 | //US |
1995 | QString Addressee::resourceLabel() | 1995 | QString Addressee::resourceLabel() |
1996 | { | 1996 | { |
1997 | return i18n("Resource"); | 1997 | return i18n("Resource"); |
1998 | } | 1998 | } |
1999 | QString Addressee::categoryLabel() | ||
2000 | { | ||
2001 | return i18n("Category"); | ||
2002 | } | ||
1999 | 2003 | ||
2000 | void Addressee::setChanged( bool value ) | 2004 | void Addressee::setChanged( bool value ) |
2001 | { | 2005 | { |
2002 | detach(); | 2006 | detach(); |
2003 | mData->changed = value; | 2007 | mData->changed = value; |
2004 | } | 2008 | } |
2005 | 2009 | ||
2006 | bool Addressee::changed() const | 2010 | bool Addressee::changed() const |
2007 | { | 2011 | { |
2008 | return mData->changed; | 2012 | return mData->changed; |
2009 | } | 2013 | } |
2010 | 2014 | ||
2011 | void Addressee::setTagged( bool value ) | 2015 | void Addressee::setTagged( bool value ) |
2012 | { | 2016 | { |
2013 | detach(); | 2017 | detach(); |
2014 | mData->tagged = value; | 2018 | mData->tagged = value; |
2015 | } | 2019 | } |
2016 | 2020 | ||
2017 | bool Addressee::tagged() const | 2021 | bool Addressee::tagged() const |
2018 | { | 2022 | { |
2019 | return mData->tagged; | 2023 | return mData->tagged; |
2020 | } | 2024 | } |
2021 | 2025 | ||
2022 | QDataStream &KABC::operator<<( QDataStream &s, const Addressee &a ) | 2026 | QDataStream &KABC::operator<<( QDataStream &s, const Addressee &a ) |
2023 | { | 2027 | { |
2024 | if (!a.mData) return s; | 2028 | if (!a.mData) return s; |
2025 | 2029 | ||
2026 | s << a.uid(); | 2030 | s << a.uid(); |
2027 | 2031 | ||
2028 | s << a.mData->name; | 2032 | s << a.mData->name; |
2029 | s << a.mData->formattedName; | 2033 | s << a.mData->formattedName; |
2030 | s << a.mData->familyName; | 2034 | s << a.mData->familyName; |