Example #1
0
QString
FriendWidget::userString( const lastfm::User& user )
{
    QString text;

    text = QString("%1").arg( user.realName().isEmpty() ? user.name() : user.realName() );
    if ( user.age() ) text.append( QString(", %1").arg( user.age() ) );
    if ( user.gender().known() ) text.append( QString(", %1").arg( genderString( user.gender() ) ) );
    if ( !user.country().isEmpty() ) text.append( QString(", %1").arg( user.country() ) );

    return text;
}