various utf8 fixed (patch from HM)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7426 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-07-04 18:50:27 +00:00
parent b85459ee02
commit 15718cbca9
4 changed files with 7 additions and 7 deletions

View File

@ -632,7 +632,7 @@ void FriendsDialog::insertSendList()
/* add all the labels */
/* (0) Person */
item -> setText(0, QString::fromStdString(details.name));
item -> setText(0, QString::fromUtf8(details.name.c_str()));
item -> setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
//item -> setFlags(Qt::ItemIsUserCheckable);

View File

@ -649,7 +649,7 @@ QString RetroShareLink::title() const
{
RsPeerDetails detail;
rsPeers->getGPGDetails(RsPgpId(_GPGid.toStdString()), detail) ;
return QString("Click to send a private message to %1 (%2).").arg(QString::fromStdString(detail.name)).arg(_GPGid) ;
return QString("Click to send a private message to %1 (%2).").arg(QString::fromUtf8(detail.name.c_str())).arg(_GPGid) ;
}
case TYPE_EXTRAFILE:
return QString("%1 (%2, Extra - Source included)").arg(hash()).arg(misc::friendlyUnit(size()));
@ -818,7 +818,7 @@ QString RetroShareLink::niceName() const
if(type() == TYPE_PUBLIC_MSG) {
RsPeerDetails detail;
rsPeers->getGPGDetails(RsPgpId(_GPGid.toStdString()), detail) ;
return QString("Click this link to send a private message to %1 (%2)").arg(QString::fromStdString(detail.name)).arg(_GPGid) ;
return QString("Click this link to send a private message to %1 (%2)").arg(QString::fromUtf8(detail.name.c_str())).arg(_GPGid) ;
}
if(type() == TYPE_CERTIFICATE)
{

View File

@ -1483,7 +1483,7 @@ void MessageComposer::setRecipientToRow(int row, enumType type, destinationType
return ;
}
name = tr("Distant peer (name: %2, PGP key: %1)").arg(QString::fromStdString(gid.toStdString())).arg(QString::fromStdString(detail.mNickname)) ;
name = tr("Distant peer (name: %2, PGP key: %1)").arg(QString::fromStdString(gid.toStdString())).arg(QString::fromUtf8(detail.mNickname.c_str())) ;
icon = QIcon(StatusDefs::imageUser(RS_STATUS_ONLINE));
}
break ;

View File

@ -314,9 +314,9 @@ ChatPage::load()
item->setData(Qt::DisplayRole,tr("Private chat invite from ")+QString::fromUtf8(detail.name.c_str())) ;
QString tt ;
tt += tr("Name : ") + QString::fromStdString(detail.name) ;
tt += "\n" + QString("PGP id : ") + QString::fromStdString(invites[i].destination_pgp_id.toStdString()) ;
tt += "\n" + QString("Valid until : ") + QDateTime::fromTime_t(invites[i].time_of_validity).toString() ;
tt += tr("Name : ") + QString::fromUtf8(detail.name.c_str())) ;
tt += "\n" + tr("PGP id : ") + QString::fromStdString(invites[i].destination_pgp_id.toStdString()) ;
tt += "\n" + tr("Valid until : ") + QDateTime::fromTime_t(invites[i].time_of_validity).toString() ;
item->setData(Qt::UserRole,QString::fromStdString(invites[i].pid.toStdString())) ;
item->setToolTip(tt) ;