summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qnativesocketengine_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-08-11 16:48:01 -0700
committerThiago Macieira <thiago.macieira@intel.com>2015-10-15 20:32:10 +0000
commit3d52b05a6356fdca1208fe1e77e431cf4b7c79c5 (patch)
tree5c378127f8be6fc261fd1202561c9ea966370f9a /src/network/socket/qnativesocketengine_p.h
parent7db9c610f1acb89b359e43400ba70d99a7b00e91 (diff)
Add QNetworkInterface::interface{IndexFromName,NameFromIndex}
These are for faster lookups between ID and name when one doesn't need the full information set about the interface. Change-Id: I7de033f80b0e4431b7f1ffff13f98d448a705c3e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/network/socket/qnativesocketengine_p.h')
-rw-r--r--src/network/socket/qnativesocketengine_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/socket/qnativesocketengine_p.h b/src/network/socket/qnativesocketengine_p.h
index 0fa1d8f96e..5cc5e529fc 100644
--- a/src/network/socket/qnativesocketengine_p.h
+++ b/src/network/socket/qnativesocketengine_p.h
@@ -45,6 +45,7 @@
// We mean it.
//
#include "QtNetwork/qhostaddress.h"
+#include "QtNetwork/qnetworkinterface.h"
#include "private/qabstractsocketengine_p.h"
#ifndef Q_OS_WIN
# include "qplatformdefs.h"
@@ -264,7 +265,8 @@ public:
bool checkProxy(const QHostAddress &address);
bool fetchConnectionParameters();
- static uint scopeIdFromString(const QString &scopeid);
+ static uint scopeIdFromString(const QString &scopeid)
+ { return QNetworkInterface::interfaceIndexFromName(scopeid); }
/*! \internal
Sets \a address and \a port in the \a aa sockaddr structure and the size in \a sockAddrSize.