mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-27 00:15:51 -04:00
fixed parsing and exporting of local+ext IPs in short invites (not compatible with IPv6)
This commit is contained in:
parent
251d022ae1
commit
37dc37ce4a
2 changed files with 85 additions and 27 deletions
|
@ -551,24 +551,25 @@ void ConnectFriendWizard::initializePage(int id)
|
|||
|
||||
ui->nodeEdit->setText(loc);
|
||||
|
||||
std::string s;
|
||||
QString s;
|
||||
|
||||
if(peerDetails.isHiddenNode)
|
||||
s += peerDetails.hiddenNodeAddress;
|
||||
s += QString::fromStdString(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.
|
||||
s += QString::fromStdString(peerDetails.localAddr)+":"+QString::number(peerDetails.localPort); // 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(!s.isNull()) s += " / " ;
|
||||
s += QString::fromStdString(peerDetails.extAddr) + ":"+QString::number(peerDetails.extPort);
|
||||
}
|
||||
|
||||
if(!peerDetails.dyndns.empty())
|
||||
s += "(" + peerDetails.dyndns + ")" ;
|
||||
s += " (" + QString::fromStdString(peerDetails.dyndns) + ")" ;
|
||||
}
|
||||
ui->ipEdit->setText(QString::fromStdString(s));
|
||||
ui->ipEdit->setText(s);
|
||||
ui->signersEdit->setPlainText(ts);
|
||||
|
||||
fillGroups(this, ui->groupComboBox, groupId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue