Browse Source

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 years ago
parent
commit
d753758ed4
1 changed files with 2 additions and 1 deletions
  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();
   }