From 1efe5d4b4141ef7b47c692f244178496578f15ae Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Fri, 6 Dec 2013 13:36:03 +0100 Subject: WinRT: Fixed compilation of network autotests and benchmarks Change-Id: Id689f199cfb22dce231cec36faba57ab958b1bac Reviewed-by: Maurice Kalinowski --- .../platformsocketengine/tst_platformsocketengine.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'tests/auto/network/socket/platformsocketengine') diff --git a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp index f474f97f5d..35028735e2 100644 --- a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp +++ b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp @@ -64,7 +64,11 @@ #define PLATFORMSOCKETENGINE QNativeSocketEngine #define PLATFORMSOCKETENGINESTRING "QNativeSocketEngine" -#include +#ifndef Q_OS_WINRT +# include +#else +# include +#endif #include @@ -97,7 +101,9 @@ private slots: void networkError(); void setSocketDescriptor(); void invalidSend(); +#ifndef Q_OS_WINRT void receiveUrgentData(); +#endif void tooManySockets(); }; @@ -608,7 +614,9 @@ void tst_PlatformSocketEngine::networkError() QVERIFY(client.state() == QAbstractSocket::ConnectedState); // An unexpected network error! -#ifdef Q_OS_WIN +#ifdef Q_OS_WINRT + client.close(); +#elif defined(Q_OS_WIN) // could use shutdown to produce different errors ::closesocket(client.socketDescriptor()); #else @@ -641,6 +649,7 @@ void tst_PlatformSocketEngine::invalidSend() } //--------------------------------------------------------------------------- +#ifndef Q_OS_WINRT void tst_PlatformSocketEngine::receiveUrgentData() { PLATFORMSOCKETENGINE server; @@ -703,6 +712,7 @@ void tst_PlatformSocketEngine::receiveUrgentData() QCOMPARE(response.at(0), msg); #endif } +#endif // !Q_OS_WINRT QTEST_MAIN(tst_PlatformSocketEngine) #include "tst_platformsocketengine.moc" -- cgit v1.2.3