summaryrefslogtreecommitdiffstats
path: root/tests/auto/network-settings.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/network-settings.h')
-rw-r--r--tests/auto/network-settings.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h
index 65d4bb5cea..641bf1d672 100644
--- a/tests/auto/network-settings.h
+++ b/tests/auto/network-settings.h
@@ -134,6 +134,22 @@ public:
return true;
}
+ static bool canBindToLowPorts()
+ {
+#ifdef Q_OS_UNIX
+ if (geteuid() == 0)
+ return true;
+ if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSMojave)
+ return true;
+ // ### Which versions of iOS, watchOS and such does Apple's opening of
+ // all ports apply to?
+ return false;
+#else
+ // Windows
+ return true;
+#endif
+ }
+
#ifdef QT_NETWORK_LIB
static bool verifyTestNetworkSettings()