Changed the constant QHostAddress::LocalHost to QHostAddress::LocalHostIPv6

This commit is contained in:
Denis Davydov 2018-06-28 16:51:19 +03:00
parent bbfcfd00d9
commit 8d8649e5f9

View File

@ -36,7 +36,7 @@ QString Network::local_ipv6()
{
QHostAddress address;
foreach (address, QNetworkInterface::allAddresses()) {
if (address.protocol() == QAbstractSocket::IPv6Protocol && address != QHostAddress(QHostAddress::LocalHost))
if (address.protocol() == QAbstractSocket::IPv6Protocol && address != QHostAddress(QHostAddress::LocalHostIPv6))
break;
}
return(address.toString());