mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-23 05:41:24 -05:00
added proper display of local/ext IPs and DNS in connect friend wizard
This commit is contained in:
parent
9a2749dbe5
commit
71edea3775
@ -550,7 +550,25 @@ void ConnectFriendWizard::initializePage(int id)
|
||||
}
|
||||
|
||||
ui->nodeEdit->setText(loc);
|
||||
ui->ipEdit->setText(QString::fromStdString(peerDetails.isHiddenNode ? peerDetails.hiddenNodeAddress : peerDetails.extAddr));
|
||||
|
||||
std::string s;
|
||||
if(peerDetails.isHiddenNode)
|
||||
s += peerDetails.hiddenNodeAddress;
|
||||
else
|
||||
{
|
||||
if(peerDetails.localAddr!="0.0.0.0")// This is not so nice, but because we deal we string there's no way
|
||||
s += peerDetails.localAddr; // to ask about if the ip is null. We really need a proper IP class.
|
||||
|
||||
if(peerDetails.extAddr!="0.0.0.0")
|
||||
{
|
||||
if(!s.empty()) s += " / " ;
|
||||
s += peerDetails.extAddr;
|
||||
}
|
||||
|
||||
if(!peerDetails.dyndns.empty())
|
||||
s += "(" + peerDetails.dyndns + ")" ;
|
||||
}
|
||||
ui->ipEdit->setText(QString::fromStdString(s));
|
||||
ui->signersEdit->setPlainText(ts);
|
||||
|
||||
fillGroups(this, ui->groupComboBox, groupId);
|
||||
|
Loading…
Reference in New Issue
Block a user