Skip to content

Commit

Permalink
Qt4 regression fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
pbludov committed Nov 23, 2016
1 parent efa24ab commit 274d9be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dicom/dicomdevicesettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <QLineEdit>
#include <QSettings>
#include <QSpinBox>
#include <QtNetwork/QHostAddress>
#include <QtNetwork/QHostInfo>
#include <QtNetwork/QNetworkInterface>

Expand Down Expand Up @@ -106,7 +107,11 @@ DicomDeviceSettings::DicomDeviceSettings(QWidget *parent) :

foreach (auto addr, QNetworkInterface::allAddresses())
{
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
if (addr.isLoopback())
#else
if (addr.scopeId() == "Node-local" || addr.isInSubnet(QHostAddress(0x7F000000), 8))
#endif
{
// Skip 127.x.x.x and IPv6 local subnet
continue;
Expand Down

0 comments on commit 274d9be

Please sign in to comment.