-rw-r--r-- | libkcal/person.cpp | 8 | ||||
-rw-r--r-- | libkcal/person.h | 1 |
2 files changed, 8 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 @@ -51,3 +51,9 @@ bool KCal::operator==( const Person& p1, const Person& p2 ) - +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 diff --git a/libkcal/person.h b/libkcal/person.h index c46c5f0..3cec153 100644 --- a/libkcal/person.h +++ b/libkcal/person.h @@ -37,2 +37,3 @@ class Person QString name() const { return mName; } + QString realName() const; |