Fix IPv6 address format

This commit is contained in:
Natsumi Higa 2021-03-31 11:13:24 +09:00 committed by Aleix Pol Gonzalez
parent 80178b8ff8
commit 67a92451e4

View file

@ -111,6 +111,10 @@ void Mounter::onPackageReceived(const NetworkPacket& np)
return;
}
QString ip = addr.toString();
if (addr.protocol() == QAbstractSocket::IPv6Protocol) {
ip.prepend(QLatin1Char('['));
ip.append(QLatin1Char(']'));
}
const QStringList arguments = QStringList()
<< QStringLiteral("%1@%2:%3").arg(