mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-14 12:50:20 +02:00
don't use reserved word causing issues on windows
This commit is contained in:
parent
52203bd36e
commit
7d4399da35
1 changed files with 5 additions and 6 deletions
|
@ -11,7 +11,6 @@
|
||||||
|
|
||||||
#include <QtCore/QDataStream>
|
#include <QtCore/QDataStream>
|
||||||
#include <QtNetwork/QHostInfo>
|
#include <QtNetwork/QHostInfo>
|
||||||
#include <QtNetwork/qnetworkconfigmanager.h>
|
|
||||||
#include <QtNetwork/QNetworkInterface>
|
#include <QtNetwork/QNetworkInterface>
|
||||||
|
|
||||||
#include "HifiSockAddr.h"
|
#include "HifiSockAddr.h"
|
||||||
|
@ -96,13 +95,13 @@ quint32 getHostOrderLocalAddress() {
|
||||||
static int localAddress = 0;
|
static int localAddress = 0;
|
||||||
|
|
||||||
if (localAddress == 0) {
|
if (localAddress == 0) {
|
||||||
foreach(const QNetworkInterface &interface, QNetworkInterface::allInterfaces()) {
|
foreach(const QNetworkInterface &networkInterface, QNetworkInterface::allInterfaces()) {
|
||||||
if (interface.flags() & QNetworkInterface::IsUp
|
if (networkInterface.flags() & QNetworkInterface::IsUp
|
||||||
&& interface.flags() & QNetworkInterface::IsRunning
|
&& networkInterface.flags() & QNetworkInterface::IsRunning
|
||||||
&& interface.flags() & ~QNetworkInterface::IsLoopBack) {
|
&& networkInterface.flags() & ~QNetworkInterface::IsLoopBack) {
|
||||||
// we've decided that this is the active NIC
|
// we've decided that this is the active NIC
|
||||||
// enumerate it's addresses to grab the IPv4 address
|
// enumerate it's addresses to grab the IPv4 address
|
||||||
foreach(const QNetworkAddressEntry &entry, interface.addressEntries()) {
|
foreach(const QNetworkAddressEntry &entry, networkInterface.addressEntries()) {
|
||||||
// make sure it's an IPv4 address that isn't the loopback
|
// make sure it's an IPv4 address that isn't the loopback
|
||||||
if (entry.ip().protocol() == QAbstractSocket::IPv4Protocol && !entry.ip().isLoopback()) {
|
if (entry.ip().protocol() == QAbstractSocket::IPv4Protocol && !entry.ip().isLoopback()) {
|
||||||
qDebug("Node's local address is %s", entry.ip().toString().toLocal8Bit().constData());
|
qDebug("Node's local address is %s", entry.ip().toString().toLocal8Bit().constData());
|
||||||
|
|
Loading…
Reference in a new issue