-rw-r--r-- | libkcal/person.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libkcal/person.cpp b/libkcal/person.cpp index aca28c2..858805d 100644 --- a/libkcal/person.cpp +++ b/libkcal/person.cpp | |||
@@ -46,13 +46,19 @@ Person::Person( const QString &name, const QString &email ) | |||
46 | bool KCal::operator==( const Person& p1, const Person& p2 ) | 46 | bool KCal::operator==( const Person& p1, const Person& p2 ) |
47 | { | 47 | { |
48 | return ( p1.name() == p2.name() && | 48 | return ( p1.name() == p2.name() && |
49 | p1.email() == p2.email() ); | 49 | p1.email() == p2.email() ); |
50 | } | 50 | } |
51 | 51 | ||
52 | 52 | QString Person::realName() const | |
53 | { | ||
54 | int ccc = mName.find (','); | ||
55 | if ( ccc < 0 ) | ||
56 | return mName; | ||
57 | return mName.mid( ccc+1 ).stripWhiteSpace() + " " + mName.left( ccc ).stripWhiteSpace(); | ||
58 | } | ||
53 | QString Person::fullName() const | 59 | QString Person::fullName() const |
54 | { | 60 | { |
55 | if( mName.isEmpty() ) { | 61 | if( mName.isEmpty() ) { |
56 | return mEmail; | 62 | return mEmail; |
57 | } else { | 63 | } else { |
58 | if( mEmail.isEmpty() ) | 64 | if( mEmail.isEmpty() ) |