Show prefixLength for IPv6 devices
This commit is contained in:
parent
ffa0fdaa74
commit
e2a11bfa4e
@ -172,9 +172,10 @@ QVariant DeviceModel::data(const QModelIndex &index, int role) const
|
|||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
if (dev->has_ip6_prefix_length()) {
|
if (dev->has_ip6_prefix_length()) {
|
||||||
OstEmul::Ip6Address ip = dev->ip6();
|
OstEmul::Ip6Address ip = dev->ip6();
|
||||||
return QHostAddress(
|
return QString("%1/%2")
|
||||||
UInt128(ip.hi(), ip.lo()).toArray())
|
.arg(QHostAddress(UInt128(ip.hi(), ip.lo())
|
||||||
.toString();
|
.toArray()).toString())
|
||||||
|
.arg(dev->ip6_prefix_length());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return QString("--");
|
return QString("--");
|
||||||
|
Loading…
Reference in New Issue
Block a user