-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 | |||
@@ -49,7 +49,13 @@ bool KCal::operator==( const Person& p1, const Person& p2 ) | |||
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() ) { |