summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* QAbstractSocket:waitForReadyRead(): fix handling UDPAlex Trotsenko2016-04-231-1/+1
| | | | | | | | Allow sockets in bound state to wait for notifications. Task-number: QTBUG-52449 Change-Id: I5c02bd61db68abca652312d4d59023963b05b3c5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* _q_networkSessionStateChanged - fix weird logicTimur Pocheptsov2016-04-222-2/+2
| | | | | | | | | a != A || a != B looks suspiciously wrong. Found, unfortunately, only by Coverity (CIDs 152247, 152249). Change-Id: Ia7ec810dde2a3a33ae6fc5644a4eebf279dcffe8 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* QNetworkReplyImplPrivate - potential nullptr dereferenceTimur Pocheptsov2016-04-191-6/+2
| | | | | | | | | | | Found by Coverity, CID 11351. If we check 'if (backend)' at one line, not clear why we do 'if (bakcend->canResume())' two lines above without any test. Also, 'delete backend' is noop if backend is nullptr, so ... even this 'if (backend)' is ... not needed. Change-Id: I7a46ce04baeb9251debb7b246954911df58880ca Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* WinRT: Removed superfluous callback that handles completed bindsOliver Wolff2016-04-132-8/+0
| | | | | | | | | | The callback was added as the functionality did not work as expected on Windows 8. The behavior seems to have been fixed so that the callback is no longer needed and can be removed. Change-Id: I3def5750271e40eea1c6a88eed693f4da4ea44bb Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winrt: Register for socket reads for correct socket engineOliver Wolff2016-04-131-29/+32
| | | | | | | | | | | | Reading from the socket must not happen from the managing socket engine but the socket engines that are spawned for reading/writing data (these are initialized with the socket descriptor given). With the current implementation the managing socket engine might be closed after the first connection so that no other socket requests will be handled. Change-Id: I76e1356bb75b8641b4f113872be143ca5c8b08cc Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winrt: Remove superfluous socketDescriptor assignmentOliver Wolff2016-04-131-1/+0
| | | | | | Change-Id: I567418f21eef2f07e0d5283f46a02305d1153e0a Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winrt: only emit readRead signal if the notifyOnRead flag is setOliver Wolff2016-04-131-2/+4
| | | | | | Change-Id: Ie52ddc8b0f70ad64d8f503b1942b9da6b72d6c99 Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winrt: Cancel pending read operations before tcp sockets are closedOliver Wolff2016-04-132-48/+78
| | | | | | | | | | | | | | According to the documentation tcp sockets are closed properly if their instances are deleted when no read operation is pending. Thus we have to keep track of the running read operation, cancel it (only available on Windows 10) and delete it before closing the socket. As there is no way to cancel the read operation on Windows 8.1 the hard reset still happens there. Change-Id: Idc75178f7d05057b610ac7000e95486d6a52cb85 Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winrt: Use correct socket error on socket closeOliver Wolff2016-04-111-2/+2
| | | | | Change-Id: I6d39b091e48a911534cb79d42d33d16041261cfb Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winrt: fix callbacks by moving them to the xaml threadOliver Wolff2016-04-111-51/+67
| | | | | Change-Id: I7b4f007107e21c02646140acd5ebe5745ca79bce Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* WinRT: Enable broadcastsOliver Wolff2016-04-111-0/+1
| | | | | | | | | | The CanBroadcast flag for QNetworkInterface indicates the ability to work in broadcast mode. As WinRT natively supports udp broadcasts and they work out of the box this flag should be set there. Task-number: QTBUG-49026 Change-Id: I6623014287fe63dc1c353a6de265ebdf9114d013 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Doc: clarify redirection handling in QNetworkRequestDavid Faure2016-04-101-4/+5
| | | | | | | | | | | The text for RedirectionTargetAttribute said the app has to handle redirections, and only said that this attribute wouldn't be set if FollowRedirectsAttribute is set, which was a bit confusing to read, before reading what exactly FollowRedirectsAttribute does. It does more than removing the other attribute, it actually follows the redirection... Change-Id: Idc634996e7b521ba05c05ca52438e47f1a411c85 Reviewed-by: Mandeep Sandhu <mandeepsandhu.chd@gmail.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Note the introductory version of network redirection related enums.Jake Petroules2016-04-092-0/+3
| | | | | | | | | These were missed in d815de8c26ccee33713e37a0fec2982755dcfe1f which originally added these values. Change-Id: I69618c90e71f7cc01eef3db477427759e62f626b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Mandeep Sandhu <mandeepsandhu.chd@gmail.com>
* Delete the dangling generic engine object.Weng Xuetian2016-04-081-0/+2
| | | | | | Change-Id: I7d7531f1a678bf186e3a992091344fff64721dec Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
* winrt: Add capabilities as specified by modulesMaurice Kalinowski2016-04-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | So far no capabilities (but internetClient for Windows 10) were added by default, which forced developers to always manually edit the WINRT_MANIFEST.capabilities(_device) property. This allowed to leave out non-required capabilities and keep the created manifest clean, examples being microphone for multimedia. However, this also breaks first user experience as deeper knowledge about this topic is required. Furthermore this is inconsistent with other platforms like Android, where all capabilities are set by default and developers need to edit the manifest manually in any case. With this change, modules can define the capability set to enable all features in the module. If developers want to disable some again, they need to adapt the generated manifest. From our experience this needs to be done in any case, latest at publishing stage when the store manipulates the manifest. Task-number: QTBUG-38802 Change-Id: I6d522268ee0afbfa00a30dbdd5e6ec9f415bebf3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Limit URLs for proxy auto config to 2083 charsSebastian Lösch2016-04-071-3/+12
| | | | | | | | | On Windows only URLs up to 2083 characters are supported, so longer URLs are truncated. Task-number: QTBUG-52271 Change-Id: I625e4d089df4d977d39e61e5831611e04260e729 Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
* QFtp: Use UTF-8 encoding.Friedemann Kleint2016-04-071-5/+5
| | | | | | | | | | According to RFC 2640, FTP uses UTF-8 encoding. Fix the conversions accordingly. Task-number: QTBUG-52303 Change-Id: I615199b3d074fc3861f25df113dda672525766b6 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Remove superfluous includes from qlocalsocket_win.cppJoerg Bornemann2016-04-061-4/+0
| | | | | Change-Id: I4f641966af3443d0c487df95d2e565182a945bf3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Add a write buffer to QLocalSocket/WinJoerg Bornemann2016-03-243-14/+41
| | | | | | | | | | | | | | | | | Commit 0307c008 removed the buffering of data-to-be-written from QWindowsPipeWriter, because it was assumed that users of this class (QProcess and QLocalSocket) already buffer data internally. This assumption was wrong for QLocalSocket. The following sequence localSocket->write(someData); localSocket->write(someMoreData); would not write anything on the second write. Add a write buffer to the Windows implementation of QLocalSocket. Task-number: QTBUG-52073 Change-Id: I6d0f03a722ec48138cbde3e2f69aae7dafe790d3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Fix typo in QLocalServer documentationSimon Hausmann2016-03-241-1/+1
| | | | | Change-Id: Iceababb1e137c2363ee8a75476ecb4f5dba53b28 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Make QWindowsPipeWriter thread-free.Joerg Bornemann2016-03-171-1/+0
| | | | | | | | | | | | | | | Re-work QWindowsPipeWriter to not use a thread anymore but the WriteFileEx API, similar to QWindowsPipeReader. This saves us a lot of thread synchronization code and enables us to directly write data without yet another buffering layer. Also, this fixes the dreaded deadlocks in the QWindowsPipeWriter destructor that could occur when the reading end was closed before the write was finished. Task-number: QTBUG-23378 Task-number: QTBUG-38185 Change-Id: If0ae96dcd756f716ddf6fa38016080095bf3bd4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Don't include by default ciphers that are not supportedAntonio Larrosa2016-03-141-3/+5
| | | | | | | | | | | There could be cases (mostly when compiled on old systems, since modern openssl versions don't include such insecure ciphers) in which defaultCiphers included a cipher that wasn't in the supported ciphers list. With this patch we make sure that defaultCiphers is a subset of supportedCiphers Change-Id: I545ea21f5fd3a6ed13b366cdd56a1393233f9fc9 Reviewed-by: Richard J. Moore <rich@kde.org>
* Do not send the trailing dot of a hostname as part of the SNIRichard J. Moore2016-03-131-0/+4
| | | | | | | | | The SNI extension must not include the trailing dot, even though this is legitimate for the host header. Task-number: QTBUG-51821 Change-Id: Ib7a7d8b1f8f98bc99ae745b03d2b97e507adefaf Reviewed-by: Daniel Molkentin (ownCloud) <danimo@owncloud.com>
* QNetworkHeaders: fix UB (invalid enum value) in Private::parseAndSetHeader()Marc Mutz2016-03-121-5/+7
| | | | | | | | | | | | | | | | | Found by UBSan: qnetworkrequest.cpp:1016:19: runtime error: load of value 4294967295, which is not a valid value for type 'KnownHeaders' KnownHeaders does not contain a failure state, and no negative values. -1 is therefore not a valid value for an object of type KnownHeaders, so loading one is considered UB. Fix by returning the result of parseHeaderName() as an int, only casting to KnownHeaders after checking for the failure case. Change-Id: I6b165fe2b15c747344a9b2750bb753582c5bcbeb Reviewed-by: Richard J. Moore <rich@kde.org>
* QLocalServer/Win: Fix race condition in listen().Joerg Bornemann2016-03-101-30/+40
| | | | | | | | | | | | | | Suppose a client connects while the QLocalServer is still in the loop that calls addListener. The connection would SetEvent(eventHandle), but every call to ConnectNamedPipe would ResetEvent(eventHandle). Thus, the connection is never detected by the notifier on eventHandle. Callers of addListener must check the connection state of every listener to make sure that no client connected while setting up listeners. Task-number: QTBUG-49254 Change-Id: Ia961927ea76973708e6e3f73510695eb5d6a0e4c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Deduplicate a condition to make clear that several cases ask it.Edward Welbourne2016-03-101-27/+25
| | | | | | | | | | QNetworkAccessManager::createRequest() had three checks relevant only to GET and HEAD requests; rather than testing for this in each of the cases, test for it once and skip all three if it fails. Tidied up the residue of conditionals in the process. Change-Id: I7baee8067a03afdc7cb0a77f1a50759dc4233843 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Skip spurious .toLower() on returns of QUrl::scheme()Edward Welbourne2016-03-104-4/+4
| | | | | | | | | QUrl::setScheme() parses and canonicalises the scheme, so that scheme() always returns a lower-case string anyway; no need to .toLower() it. Change-Id: Ied00814b63f159386a42552dcf06346ee56f9f97 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Accept LFCRLF to mark end of HTTP HeadersDyami Caliri2016-03-092-4/+3
| | | | | | | | | | Some embedded servers use LF to mark the end of an individual header, but use CRLF to mark the end of all the headers. The GoPro WiFi interface does this, as an example. Change-Id: I227ab73622c84f439a6cf8703d020393c4d8bf69 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
* Use booleans as booleans; don't compare == true to do so !Edward Welbourne2016-03-081-3/+3
| | | | | Change-Id: Ic900bf000cec52b3ebf0fd0fc61f42252f3200e6 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Purge a verbose no-op.Edward Welbourne2016-03-081-4/+0
| | | | | | | | | An if with no side-effects in its test and an empty body is a no-op. An else block with nothing but a no-op in it is a no-op. A no-op without even pedagogic value is just a distraction. Change-Id: I224831a325e6b770d0a99d726d96f73da4b8c11f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Simplified repeated #if-ery and entangled conditionals.Edward Welbourne2016-03-081-9/+7
| | | | | | | | | | Three checks of the same #if managed to save repetition of (if I felt charitable) three shared lines, compared to combining the three into one, which leaves the code easier to read (and obviates the need for one of the "shared" lines). Split a long line while moving it. Change-Id: I762d10ae1df1224c749206b8eb490bafd7ea4900 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Duplicate trivial code for clarity on early return.Edward Welbourne2016-03-081-7/+4
| | | | | | | | | | Having a variable in which to store a function's return in two branches of a switch in order to return if either was true saved little relative to just testing the function in each case and returning in situ, which reads more clearly. Change-Id: Ibd95a95721eaa6fc4861b10e723038b96caf269a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-03-071-5/+4
| | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Icbce502dcbcb4d4b4d922c42679f44e2cc930bf3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* QAbstractSocket: fix a possible crash in waitForReadyRead()Alex Trotsenko2016-03-021-4/+3
| | | | | | | | waitForConnected() could return 'true' even when the socket was disconnected. Change-Id: I99d9c9730f4e9b6c8a54696eb92c24c3ef36d261 Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
* QtNetwork: Silence Clang on Windows.Friedemann Kleint2016-02-172-14/+1
| | | | | | | | | Remove dead code and fix override. Task-number: QTBUG-50804 Change-Id: I9cc28507e549d56a1f15fcc54bb6f7465beef644 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix QT_DEPRECATED_SINCE usageJędrzej Nowacki2016-02-021-1/+1
| | | | | | | | The deprecation was introduced in 5.6 Change-Id: Ief6b749b40ec75c3c9f904caed8447bfb5ef5439 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QNetworkProxyFactory: don't re-call QUrl::scheme() in if-else chain.Anton Kudryavtsev2016-01-291-5/+6
| | | | | | | | ... Just cache it. Change-Id: Iae70e09233b237d904ab100f46f8dc7ab9ac8e04 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't use QStringLiteral in comparisonsAnton Kudryavtsev2016-01-281-5/+5
| | | | | | | | | | | | | | | For QLatin1String, operator== is overloaded, so comparing to a latin-1 (C) string literal is efficient, since strlen() is comparatively fast. OTOH, QStringLiteral, when not using RVO, litters the code with QString dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just compare using QLatin1String instead. Change-Id: I761b2b26ab5b416bc695f524a9ee607dacf0a7b2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* winrt: Fix potential crash in readDatagramMaurice Kalinowski2016-01-211-1/+1
| | | | | | | | | | | | | | The native socket engine used strcpy for WinRT, which tries to copy terminating null character. The QSocketNotifier::async_readDatagramSlot autotest uses a buffer of size 1, which causes readDatagram to overwrite the buffer on the stack. Hence use memcpy instead to protect from additional copies beyond barriers. Note that we cannot use qstrcpy as that does a buf[size-1] = '\0' at the end, which would remove content for a buf size of 1. Change-Id: I20baf9e63646cd28c1c954a20b8ae9c7d5873c31 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* QNetworkInterface: don't add a QNetworkAddressEntry if no IP is knownThiago Macieira2016-01-211-17/+17
| | | | | | | | | | If SIOCGIFADDR fails, then don't bother trying to get the broadcast address or netmask, and especially don't add the empty QNetworkAddressEntry to the interface. This can happen on interfaces that have no IP address assigned (for example, inactive interfaces). Change-Id: I8de47ed6c7be4847b99bffff141c326d94ecca78 Reviewed-by: Richard J. Moore <rich@kde.org>
* QNetworkInterface: fix handling of interfaces with no addressesThiago Macieira2016-01-211-1/+1
| | | | | | | | Certain Linux interfaces have no addresses at all (hardware or IP), like the nlmon interfaces. They weren't being reported. Change-Id: I8de47ed6c7be4847b99bffff141c2b60c2089ad3 Reviewed-by: Richard J. Moore <rich@kde.org>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-196-4/+24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/common/atomic64/atomic64.cpp configure src/3rdparty/forkfd/forkfd.c src/corelib/io/forkfd_qt.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tools/configure/configureapp.cpp Change-Id: Ic6168d82e51a0ef1862c3a63bee6722e8f138414
| * Do not discard WSAECONNRESET error code from UDP under WindowsAlex Trotsenko2016-01-043-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a datagram is sent to a closed host/port combination, the host will likely send back an ICMP error message. In the regular socket API, there isn't a good way of actually receiving this error, so some Windows kernels wired that message back up to the call to WSARecvFrom() as a synthetic datagram. Reading this datagram results in a WSAECONNRESET error code, which should reported to the user as a refused connection attempt. To make the errors a bit more informative, the native error strings for WSAECONNRESET and WSAENETRESET were also added. Task-number: QTBUG-49301 Change-Id: If659be54ba1b39965b5f481f0c0cb9eeea0a06d2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
| * QAbstractSocket: do not enable read notifications on TCP in bind()Alex Trotsenko2015-12-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In bind+connect scenario, rejected connection can trigger a read notification while the socket is opened. But unlike UDP, reading from the socket engine or emitting a readyRead() signal is not allowed for the TCP socket in bound or connecting state. To make a bind+connect scenario work properly, disable the read notifications until a connection is established. Task-number: QTBUG-50124 Change-Id: I7b3d015b0f6021fb9ff9f83560478aa5545f41f5 Reviewed-by: Richard J. Moore <rich@kde.org>
| * doc: Remove wrong statement about cache filenames.Florian Bruhin2015-12-101-2/+1
| | | | | | | | | | | | | | | | | | The cache actually generates paths like "http/data8/f/lr9un1so.d". Change-Id: Ie564494a241c3d1c87b2f0f17b42bd0349948640 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| * Add missing \since to QSslCipher QString overload.Florian Bruhin2015-12-101-0/+2
| | | | | | | | | | | | | | | | This was added in 5.3 in 30d199a76c7d30d9d70eb6cd7594826e7bf6de61. Change-Id: I35a209fcfe417cb14605c4db19a3d2e85b67ee49 Reviewed-by: Michał Dutkiewicz Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QHttpSocketEngine: ensure pending EOF triggers a notificationAlex Trotsenko2016-01-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | When the remote peer closed the connection, a read notification needs to always be emitted, otherwise the higher layer does not get the disconnected signal. From the other side, underlying QAbstractSocket object could temporarily disable notifications from the engine at any time. To avoid possible blocking of the socket, take a pending EOF into account when the read notifications are re-enabled. Change-Id: Iac9d4e2f790530be3500baf5a2000f1f63df5cc2 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* | Fix documentation for ReuseAddressHint on Unix.David Faure2016-01-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The code says (for Q_OS_UNIX) if ((mode & QAbstractSocket::ShareAddress) || (mode & QAbstractSocket::ReuseAddressHint)) socketEngine->setOption(QAbstractSocketEngine::AddressReusable, 1); so clearly ReuseAddressHint does the same as ShareAddress, which is: setting SO_REUSEADDR. Change-Id: Ic2ab4d139c3f58c3c63723fc609a9d4f71bac97a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | winrt: Use "await" with its timeout for dns queriesOliver Wolff2016-01-051-17/+28
| | | | | | | | | | | | | | | | | | | | By using await instead of using a custom wait function we get rid of a lot of "function was called at an unexpected time" warnings and use the default way of waiting for an asynchronous function to complete. Change-Id: I6c5bf73ccf68a219b8f3facd3531873d7e8d4c67 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* | winrt: Use winsock2 API for hostname resolution on WinRT/WinPhoneOliver Wolff2016-01-053-158/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That API has been available for WinRT and Windows Phone for some time now. By using it to get the machine name and for hostname resolution we can get rid of some winrt-only code and use qhostinfo_win.cpp on WinRT and Windows phone as well. Additionally the required capability was added to tst_qhostinfo so that this auto test can be run without any manual editing. Change-Id: I63fa5521bf8cdb0c919bd5a0100ea977c865622a Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>