-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 @@ -48,9 +48,15 @@ bool KCal::operator==( const Person& p1, const Person& p2 ) return ( p1.name() == p2.name() && p1.email() == p2.email() ); } - +QString Person::realName() const +{ + int ccc = mName.find (','); + if ( ccc < 0 ) + return mName; + return mName.mid( ccc+1 ).stripWhiteSpace() + " " + mName.left( ccc ).stripWhiteSpace(); +} QString Person::fullName() const { if( mName.isEmpty() ) { return mEmail; |