فهرست منبع

List IPv6 host addresses on debug overlay

Fixes #165.

I'm seeing some strange stuff appended to the address on Linux with Qt
5.6 alpha. I assume this is a harmless bug that will go away in later
releases.
Vincent Lang 9 سال پیش
والد
کامیت
d753758ed4
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      src/system/SystemComponent.cpp

+ 2 - 1
src/system/SystemComponent.cpp

@@ -240,7 +240,8 @@ QStringList SystemComponent::networkAddresses() const
   QStringList list;
   foreach(const QHostAddress& address, QNetworkInterface::allAddresses())
   {
-    if (! address.isLoopback() && (address.protocol() == QAbstractSocket::IPv4Protocol))
+    if (! address.isLoopback() && (address.protocol() == QAbstractSocket::IPv4Protocol ||
+                                   address.protocol() == QAbstractSocket::IPv6Protocol))
       list << address.toString();
   }