mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-15 02:44:20 -05:00
Fixed to display when Peer name is not avaible with a default string.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2663 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
128f3dd454
commit
a79c5eca10
@ -887,13 +887,24 @@ void MessagesDialog::insertMsgTxtAndFiles(QModelIndex Index)
|
|||||||
QString msgTxt;
|
QString msgTxt;
|
||||||
for(pit = msgInfo.msgto.begin(); pit != msgInfo.msgto.end(); pit++)
|
for(pit = msgInfo.msgto.begin(); pit != msgInfo.msgto.end(); pit++)
|
||||||
{
|
{
|
||||||
|
if (QString::fromStdString(rsPeers->getPeerName(*pit)) == "")
|
||||||
|
{
|
||||||
|
msgTxt += "<a style='color: black;'href='" + tr("Anonymous") + "@" + QString::fromStdString(*pit) + "'> " + tr("Anonymous") + "</a>" + " ";
|
||||||
|
}
|
||||||
|
else
|
||||||
msgTxt += "<a style='color: black;'href='" + QString::fromStdString(rsPeers->getPeerName(*pit)) + "@" + QString::fromStdString(*pit) + "'> " + QString::fromStdString(rsPeers->getPeerName(*pit)) + "</a>" + " ";
|
msgTxt += "<a style='color: black;'href='" + QString::fromStdString(rsPeers->getPeerName(*pit)) + "@" + QString::fromStdString(*pit) + "'> " + QString::fromStdString(rsPeers->getPeerName(*pit)) + "</a>" + " ";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msgInfo.msgcc.size() > 0)
|
if (msgInfo.msgcc.size() > 0)
|
||||||
msgTxt += "\nCc: ";
|
msgTxt += "\nCc: ";
|
||||||
for(pit = msgInfo.msgcc.begin(); pit != msgInfo.msgcc.end(); pit++)
|
for(pit = msgInfo.msgcc.begin(); pit != msgInfo.msgcc.end(); pit++)
|
||||||
{
|
{
|
||||||
|
if (QString::fromStdString(rsPeers->getPeerName(*pit)) == "")
|
||||||
|
{
|
||||||
|
msgTxt += "<a style='color: black;'href='" + tr("Anonymous") + "@" + QString::fromStdString(*pit) + "'> " + tr("Anonymous") + "</a>" + " ";
|
||||||
|
}
|
||||||
|
else
|
||||||
msgTxt += "<a style='color: black;'href='" + QString::fromStdString(rsPeers->getPeerName(*pit)) + "@" + QString::fromStdString(*pit) + "'> " + QString::fromStdString(rsPeers->getPeerName(*pit)) + "</a>" + " ";
|
msgTxt += "<a style='color: black;'href='" + QString::fromStdString(rsPeers->getPeerName(*pit)) + "@" + QString::fromStdString(*pit) + "'> " + QString::fromStdString(rsPeers->getPeerName(*pit)) + "</a>" + " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -901,6 +912,11 @@ void MessagesDialog::insertMsgTxtAndFiles(QModelIndex Index)
|
|||||||
msgTxt += "\nBcc: ";
|
msgTxt += "\nBcc: ";
|
||||||
for(pit = msgInfo.msgbcc.begin(); pit != msgInfo.msgbcc.end(); pit++)
|
for(pit = msgInfo.msgbcc.begin(); pit != msgInfo.msgbcc.end(); pit++)
|
||||||
{
|
{
|
||||||
|
if (QString::fromStdString(rsPeers->getPeerName(*pit)) == "")
|
||||||
|
{
|
||||||
|
msgTxt += "<a style='color: black;'href='" + tr("Anonymous") + "@" + QString::fromStdString(*pit) + "'> " + tr("Anonymous") + "</a>" + " ";
|
||||||
|
}
|
||||||
|
else
|
||||||
msgTxt += "<a style='color: black;'href='" + QString::fromStdString(rsPeers->getPeerName(*pit)) + "@" + QString::fromStdString(*pit) + "'> " + QString::fromStdString(rsPeers->getPeerName(*pit)) + "</a>" + " ";
|
msgTxt += "<a style='color: black;'href='" + QString::fromStdString(rsPeers->getPeerName(*pit)) + "@" + QString::fromStdString(*pit) + "'> " + QString::fromStdString(rsPeers->getPeerName(*pit)) + "</a>" + " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user