summaryrefslogtreecommitdiffstats
path: root/src/network/socket
Commit message (Collapse)AuthorAgeFilesLines
* Modernize use of 'http' featureUlf Hermann2017-11-063-5/+12
| | | | | | | | | | Exclude QHttp(Multi)Part from being built if http is disabled, and replace the exclusion macros. Use the qmake project files to exclude source files, and QT_REQUIRE_CONFIG(http) in headers. Change-Id: I432fa3c78aa97b5ed2eb1027ac1dc3bdb134f9ba Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Remove references to obsolete platformsJake Petroules2017-11-051-3/+0
| | | | | | | | | | | | | | ultrix and reliant have not seen a release since 1995. dgux not since 2001. bsdi not since 2003. irix not since 2006. osf not since 2010. dynix... unclear, but no later than 2002. symbian needs no mention. All considered obsolete, all gone. sco and unixware are effectively obsolete. Remove them until someone expresses a real need. Change-Id: Ia3d9d370016adce9213ae5ad0ef965ef8de2a3ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-10-242-13/+5
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsmousehandler.cpp src/plugins/platforms/xcb/qxcbimage.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/manual/qtabletevent/regular_widgets/main.cpp Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io> Done-with: Mårten Nordheim<marten.nordheim@qt.io> Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
| * QHostInfo: Make getaddrinfo() mandatoryThiago Macieira2017-10-181-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All systems must implement it by now. If there's any system still without it, that means it has no IPv6 support, so they can disable QtNetwork entirely. [ChangeLog][Deprecation Notice] Starting with Qt 5.10, IPv6 support is mandatory for all platforms. Systems without proper IPv6 support, such as the getaddrinfo() function or the proper socket address structures, will not be able to build QtNetwork anymore. Change-Id: I3868166e5efc45538544fffd14d8c28046f9191b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-161-3/+5
| |\ | | | | | | | | | Change-Id: I3cf73c53cf131d0babfb558c2507bed0e0fc5f08
| | * QUdpSocket: make sure receiveDatagram() returns empty on errorThiago Macieira2017-10-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the datagram reception failed, we forgot to set the buffer back to empty. The returned QNetworkDatagram did report isValid() == false, but it was possible to get the .data() and check its size, getting nonsense. Tests in the next commit. Change-Id: I638cf58bfa7b4e5fb386fffd14ea91adf2133d47 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-173-33/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-043-33/+8
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/corelib/global/qglobal.h src/corelib/tools/qcryptographichash.cpp src/corelib/tools/qcryptographichash.h src/corelib/tools/qmessageauthenticationcode.cpp src/plugins/platforms/windows/qwindowswindow.h tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST Change-Id: Ib68112de985a3d714c2071f47c10e907e4f0229a
| | * QAbstractSocket: fix handling of successful connectToHostByName()Alex Trotsenko2017-09-271-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | In case connectToHostByName() returns 'true', we should fetch the connection parameters and emit connected() signal. Change-Id: Id36b6d71005b8cec070a1b12e7bb0caf8bf0bcb9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * QAbstractSocket: remove disconnect timerAlex Trotsenko2017-09-203-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nowadays, there is no need for this additional timer. It was intended to forcibly disconnect the socket if an appropriate write notification has not arrived. After several fixes in the notification system this does not occur anymore, because otherwise we might have seen the hangs in the regular data transmitting. Also, it can break a delaying disconnect of the socket, if a write chunk is large enough. Task-number: QTBUG-63000 Change-Id: I9b9fd46af0209f9ce006a6d5ee5bfac9ea85482d Reviewed-by: Anthony Groyer <anthony.groyer@airliquide.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Qt Network: Remove code for Windows < 7Friedemann Kleint2017-09-291-8/+3
| | | | | | | | | | | | | | | Change-Id: I21b93b8d550f4a1f3e26d5d516886c76b2364e7b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-266-29/+39
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * | QNativeSocketEngine: Simplify nativeHasPendingDatagrams()Thiago Macieira2017-09-131-11/+3
| | | | | | | | | | | | | | | | | | | | | We don't need the sockaddr structure. Change-Id: I6e9274c1e7444ad48c81fffd14da826387d72f83 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | QNativeSocketEngine: reduce memory usage in nativePendingDatagramSize()Thiago Macieira2017-09-132-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Windows implementation had the right idea: by using a chunked read, we can tell the OS to reuse the same buffer over and over, so we don't need to grow a buffer to the size of the datagram when peeking. This commit implements that strategy on Unix and changes both implementations to start at 1500 bytes instead of 8192 (1500 is more than enough for almost all datagrams we're going to receive). Let's also not use a static buffer, but a stack-based one. No need to dedicate 1500 (or, worse, 8192) bytes for something that is only seldom called. Change-Id: I320d9d2f42284a69a4cbfffd14dd92a6775bf28b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-062-8/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/qopenglwidget/main.cpp src/3rdparty/pcre2/src/pcre2_printint.c src/plugins/platforms/cocoa/qnsview.mm src/widgets/widgets/qcombobox.cpp Change-Id: I37ced9da1e8056f95851568bcc52cd5dc34f56af
| | * Convert features.socks5 to QT_[REQUIRE_]CONFIGStephan Binner2017-09-062-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | The sources were already added conditionally in the project file since 179fe5981fa. Change-Id: I0baaec2e772f3e596d311c1973b9745aa2b80423 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | Merge dev into 5.10Frederik Gladhorn2017-09-021-2/+15
| |\ \ | | | | | | | | | | | | Change-Id: I5fb5e7e6e57bb5db6fcb1f670f7f6cbc8def2d60
| * | | QNativeSocketEngine: disable unused methods about OS socket bufferThiago Macieira2017-09-012-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | They aren't used in the API, so let's stop wasting library size. Change-Id: I6e9274c1e7444ad48c81fffd14db247ecf825a57 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | QAbstractSocket: fix printing a debug message on successful connectAlex Trotsenko2017-09-251-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To have a consistent debug listing, we should print this message just before emitting the signals. Change-Id: Ibffcf1134d8b16c114fb54cad9afae86b5153f95 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | QAbstractSocket: optimize skippingAlex Trotsenko2017-09-222-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid an unnecessary call to the slow base implementation on buffered TCP socket. Change-Id: Icc823b416b267aa8e0c1106b20872df9ef0e22d7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | QHttpSocketEngine: replace dummy buffer + read() with skip()Alex Trotsenko2017-09-191-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iace00f478b0ea5dc3f874f337212b996af1e5104 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-197-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-1911-145/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | | QLocalSocket: forward skipping to the inner socketAlex Trotsenko2017-09-053-0/+12
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | As QLocalSocket keeps incoming data in the inner socket object, we can implement the outer's skip() by simply calling the inner's. This avoids the slow read()-based code path provided by the base class. Change-Id: I66547601ebad1b4acf168475bebd81fbeef969f8 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QUdpSocket: use faster ways to get datagram size on Linux and macOSThiago Macieira2017-08-271-2/+15
|/ / | | | | | | | | | | | | | | | | | | With MSG_TRUNC on Linux, recv/recvfrom/recvmsg will return the full size of the datagram, even if it won't fit the buffer you passed. On Darwin, we have a getsockopt() option to get that value. Change-Id: I6e9274c1e7444ad48c81fffd14da7d5b93815f90 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-151-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenu.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/widgets/styles/qstylehelper_p.h Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
| * Fix write and read-write ioctls on certain 64-bit OSThiago Macieira2017-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Using int as the operation parameter was wrong. It meant any write or RW ioctls (which have the MSB set) would be sign-extended to 64-bit when calling the native API. Depending on the OS, the upper 32 bits were not cleared prior to comparing with the call number, resulting in unexpected errors. Linux and FreeBSD operated properly; I only got the error on Darwin. Change-Id: Iaf4157b7efa2416d898cfffd14d985af65c1ff89 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devOswald Buddenhagen2017-08-022-2/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/widgets/qdockarealayout.cpp src/widgets/widgets/qmainwindow.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmainwindowlayout_p.h tests/auto/corelib/tools/qlocale/tst_qlocale.cpp tests/auto/other/macnativeevents/BLACKLIST tests/auto/widgets/widgets/qmenu/BLACKLIST Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
| * Fix bytesAvailable() on UDP under WindowsAlex Trotsenko2017-07-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When ::WSAIoctl() reports 1 byte available for reading, we are trying to peek an incoming datagram to ensure that the data is actually delivered. But, according to MSDN docs, we are not allowed to pass NULL as 'lpNumberOfBytesRecvd' parameter to ::WSARecvFrom() call, if 'lpOverlapped' parameter is also NULL. The case with an empty datagram is fixed accordingly. Change-Id: Id13038245332d3fb4bc18038d44a7cfd7ce04775 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix compilation failing for WinRT with QT_NO_SSLMårten Nordheim2017-07-271-1/+1
| | | | | | | | | | | | | | | | Change-Id: I5a2758065d3155f4f33b76c022c43955a9b096c2 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devGabriel de Dietrich2017-07-139-65/+33
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmainwindowlayout.cpp Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
| * Convert features.localserver to QT_[REQUIRE_]CONFIGTimur Pocheptsov2017-07-059-65/+33
| | | | | | | | | | | | | | | | | | | | Move all the logic into socket.pri and clean-up source code. Build local socket/server only if feature 'localserver' was enabled. Task-number: QTBUG-61672 Change-Id: I9f9d1a262df4bb020c8706c7cb5a66b926e0240f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Make QTcpServerPrivate exportableJesus Fernandez2017-07-051-1/+2
| | | | | | | | | | | | | | | | It is needed to create private implementations of classes inheriting from QTcpServer. Change-Id: I623aa37a6f112dc5db761bf299978ac1ccd52a2f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-043-6/+6
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
| * Respect the application and system configuration settings for the proxyAndy Shaw2017-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If an application proxy has been set or the usage of the system proxy configuration has been turned off then these should be respected rather than querying the system for the proxy. By using proxyForQuery() over systemProxyForQuery() it ensures that it first checks if there is an application proxy set before falling back to the system proxy, if using the system proxy has not been turned off. Task-number: QTBUG-61692 Change-Id: I65ed3e6bd7b3449cd4ae3757e583aa8d7724221b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QNativeSocketEnginePrivate::nativeAccept(): Add missing breakFriedemann Kleint2017-06-281-0/+1
| | | | | | | | | | | | | | | | | | Fixes GCC 7 warning: socket\qnativesocketengine_win.cpp:888:21: warning: this statement may fall through [-Wimplicit-fallthrough=] Change-Id: Idb4dce511b3ab634339ac1283d88def283a92028 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * winrt: Fix build for Windows Kit 10.0.10586.0Oliver Wolff2017-06-281-5/+4
| | | | | | | | | | | | | | | | The old SDK does not consider the macro value a constant expression, so the build fails. Change-Id: I95bdcd9ad34ee4da81016ff07e70439ed229f853 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-072-30/+10
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * winrt: Get rid of one deferral when handling socket dataOliver Wolff2017-06-022-30/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of defering one more time by emitting the signal, we can add the data to the list of available data/pending datagrams. For TCP readNotification can be invoked directly so that emission of the readyRead signal is tightly coupled to the availability of new data. For UDP sockets calling readNotification directly stops handling of more data and thus cannot be done. With the old approach it was possible, that the last bit of TCP data was lost, because the socket was closed while the data was still being processed/transferred from the worker to the engine. Task-number: QTBUG-61078 Change-Id: I9330b87876be853d310dc9e8e817ab344939d5dd Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Add QLocalServer::socketDescriptorJesus Fernandez2017-06-062-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | Adds a function to return the native socket descriptor. It allows threaded or forked applications to reuse a previously created socket. [ChangeLog][QtNetwork][QLocalServer] Added a function to retrieve the socket descriptor. Task-number: QTBUG-55043 Change-Id: I556e97000d2c02ad2bdd636984de6c7564381c6a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | More info in QLocalSocket::socketDescriptorJesus Fernandez2017-06-061-0/+14
| | | | | | | | | | | | | | | | | | Documents the returned type of values depending on the platform. Change-Id: I0659ae8a0a4c5aafd368a25564eca29973702b1e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-292-151/+166
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/win32-g++/qmake.conf mkspecs/win32-icc/qmake.conf src/platformsupport/fontdatabases/mac/coretext.pri src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: I74a6f7705c9547ed8bbac7260eb4645543e32655
| * winrt: Move handling of new socket connections into workerOliver Wolff2017-05-232-151/+166
| | | | | | | | | | | | | | | | | | | | | | | | Same as with receiving data, the "newConnection callback" might be triggered late and cause a crash if it accesses data of a destroyed object. By moving the handling of this callback to a worker without much logic we can prevent these late callbacks from doing any harm. The signals are no longer connected and thus do not trigger any problems. Change-Id: Ic61584f12a46506abe12d7b21403d0c0970c0aae Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-071-2/+9
|\| | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * Fix build without features.networkproxyTasuku Suzuki2017-04-281-2/+9
| | | | | | | | | | | | Change-Id: Ie0868b2d2ec30513e870861514b252a79dff4998 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | winrt: Use hostnames for socket connectionsOliver Wolff2017-04-101-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using IP addresses does not work for every use case on WinRT. The workaround that is in place for VPN connections uses the host name directly but has the disadvantage that it: 1) does a host lookup nevertheless and ends up using the host name afterwards. 2) needs a set environment variable to be activated. Instead of doing a host lookup we now use the same approach that is used if a proxy with the HostNameLookupCapability is present. In this case the lookup is skipped and the direction is made using the hostname. The big advantage of hostname over ip addresses on WinRt is, that Windows handles everything related to lookup and proxies (it uses the system proxy in this case), so we do not have to take care of that. As the WinRT backend falls back to the "connectToHostByName" in any case no further adaptions are needed. QT_WINRT_USE_THREAD_NETWORK_CONTEXT cannot be completely removed though as the creation of the network context should not be done unconditionally. This change partially reverts e9fa435652ef064515bd5c04c0b5e5c4a30ebca4 Task-number: QTBUG-59989 Change-Id: I5dc7481b7499192641470b4b5a6642509a4b4f38 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-073-1/+12
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/linux-icc/qmake.conf mkspecs/macx-icc/qmake.conf mkspecs/win32-icc/qmake.conf src/gui/painting/qgrayraster.c Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
| * Fix GCC warning about dereferencing type-punned pointersThiago Macieira2017-04-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC is wrong. Type-punning is when you read something of a given type as something else. We're not doing that, as it's only read as integer. qnativesocketengine_unix.cpp:1011:79: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] Too bad my plan for a good C++ solution was foiled by glibc developers. Change-Id: I27b55fdf514247549455fffd14b1a27667745e94 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Fix build when SCTP is enabledThiago Macieira2017-04-061-0/+4
| | | | | | | | | | | | | | | | c0157a9f035a27a3ba20cab0ca3ca1c6e78f0b14 was incomplete. Change-Id: I27b55fdf514247549455fffd14b158f54403663d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Fix build without features.networkinterfaceTasuku Suzuki2017-04-042-0/+6
| | | | | | | | | | Change-Id: I9fd2a7ec402a1d2d99e30f08554d86f18c6424ff Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>