summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/network/kernel')
-rw-r--r--tests/auto/network/kernel/kernel.pro4
-rw-r--r--tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp6
-rw-r--r--tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp2
3 files changed, 11 insertions, 1 deletions
diff --git a/tests/auto/network/kernel/kernel.pro b/tests/auto/network/kernel/kernel.pro
index 14080a0548..8594ad5932 100644
--- a/tests/auto/network/kernel/kernel.pro
+++ b/tests/auto/network/kernel/kernel.pro
@@ -10,6 +10,10 @@ SUBDIRS=\
qnetworkaddressentry \
qhostaddress \
+winrt: SUBDIRS -= \
+ qnetworkproxy \
+ qnetworkproxyfactory \
+
!contains(QT_CONFIG, private_tests): SUBDIRS -= \
qauthenticator \
qhostinfo \
diff --git a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp
index dd9202c748..c4d42206fe 100644
--- a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp
+++ b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp
@@ -50,6 +50,9 @@
#include <qdatastream.h>
#ifdef Q_OS_WIN
# include <qt_windows.h>
+# if defined(Q_OS_WINRT)
+# include <winsock2.h>
+# endif
#endif
class tst_QHostAddress : public QObject
@@ -336,12 +339,15 @@ void tst_QHostAddress::assignment()
address = "::1";
QCOMPARE(address, QHostAddress("::1"));
+ // WinRT does not support sockaddr_in
+#ifndef Q_OS_WINRT
QHostAddress addr("4.2.2.1");
sockaddr_in sockAddr;
sockAddr.sin_family = AF_INET;
sockAddr.sin_addr.s_addr = htonl(addr.toIPv4Address());
address.setAddress((sockaddr *)&sockAddr);
QCOMPARE(address, addr);
+#endif // !Q_OS_WINRT
}
void tst_QHostAddress::scopeId()
diff --git a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
index e81c7f71db..e3156ceb3f 100644
--- a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
@@ -67,7 +67,7 @@
#include <time.h>
#include <qlibrary.h>
-#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
#include <windows.h>
#else
#include <unistd.h>