equal
deleted
inserted
replaced
640 // |
640 // |
641 QString LogsEvent::parseContactName(const QContactName& name) |
641 QString LogsEvent::parseContactName(const QContactName& name) |
642 { |
642 { |
643 QString firstName = name.value(QContactName::FieldFirstName); |
643 QString firstName = name.value(QContactName::FieldFirstName); |
644 QString lastName = name.value(QContactName::FieldLastName); |
644 QString lastName = name.value(QContactName::FieldLastName); |
645 QString parsedName; |
645 QString parsedName = firstName; |
646 if (!lastName.isEmpty()) { |
646 if (!parsedName.isEmpty() && !lastName.isEmpty()) { |
647 if (!firstName.isEmpty()) { |
647 parsedName.append(" "); |
648 parsedName = |
648 } |
649 QString(QLatin1String("%1 %2")).arg(firstName).arg(lastName); |
649 parsedName.append(lastName); |
650 } |
|
651 else { |
|
652 parsedName = lastName; |
|
653 } |
|
654 } else if (!firstName.isEmpty()) { |
|
655 parsedName = firstName; |
|
656 } |
|
657 return parsedName; |
650 return parsedName; |
658 } |
651 } |
659 |
652 |
660 // ---------------------------------------------------------------------------- |
653 // ---------------------------------------------------------------------------- |
661 // |
654 // |