summaryrefslogtreecommitdiffstats
path: root/src/network/socket
Commit message (Collapse)AuthorAgeFilesLines
...
* winrt: Add initial setting of options and additional state checksOliver Wolff2018-03-231-2/+92
| | | | | | | | | | | | The initial settings are done for other socket engines too. The state checks return a message when they fail. Socket engine auto tests rely on these messages to be shown. Change-Id: If7734b453a24ecee4c3a028395ecdbb12859c871 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* winrt: Remove unneeded functionOliver Wolff2018-03-232-37/+0
| | | | | | Change-Id: I62f3abcabf1a0e5f909c603cbdcf407e36bd0402 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* winrt: Rework socket handlingOliver Wolff2018-03-232-98/+119
| | | | | | | | | | | | | | | | | | | | | | | | Buffer handling is now completely moved to the worker. Instead of moving data around all the time, the worker is responsible for buffer handling. When reads happen, the data that is read is used directly from the worker and its buffer is updated. With the previous approach it was possible, that transfers never completed. It was possible, that new data was read between calls of bytesAvailable and read and the availability of that data was never communicated to the user. If a read that does not read all the data happens, we signal, that there is still data available, so that the user is notified about that fact. At the same time we avoid unnecessary readyRead calls by blocking them until a read happens. To make future debugging sessions easier, categorized logging (including verbose) was added to the socket engine. Task-number: QTBUG-65556 Change-Id: I12020ffcccf8eb3efec9c36dc5b0e6c0ebef7eb5 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-201-1/+1
|\ | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: If089d5010d15c33b3c1f13912d4386207456c1a9
| * QNativeSocketEngine: fix typo in warning messageAlex Trotsenko2018-01-201-1/+1
| | | | | | | | | | Change-Id: Ic53a8a53b882f1e6b6434b943fff0a6fcd95f341 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | doc: Remove qdoc marker from inside #if 0 blockMartin Smith2018-01-181-4/+4
| | | | | | | | | | | | | | | | | | clang sees the comments inside #if 0 blocks when they occur in source files. Therefore qdoc comments can't appear inside those blocks. Change-Id: I5c9c7e9e002042710a5c26252bc7029b2d163dcf Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Add more Q_FALLTHROUGH()Friedemann Kleint2018-01-121-1/+1
| | | | | | | | | | | | | | | | Silence g++ 7.X warnings. Change-Id: Id06d06e7e3b5be2cf3934d81f1891da58dea2649 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-025-2/+41
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * tst_QUdpSocket: always use an interface when binding to IPv6Thiago Macieira2017-12-292-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Binding without an interface and expecting the OS to select something is not supported in all OSes. On FreeBSD, I keep getting EADDRNOTAVAIL. So modify our test to only join, leave and send to multicast groups with an interface selection. With this, all tests either pass or are skipped for me on Linux, FreeBSD, and macOS. On Windows, this revealed an inconsistency in behavior, which this commit adds a workaround for. Change-Id: Ifb5969bf206e4cd7b14efffd14fb6815456494d2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * QAbstractSocket: clear error code to match the error descriptionAlex Trotsenko2017-12-062-0/+5
| | | | | | | | | | | | | | | | Since 5.10, QIODevice resets the error string on opening. So, we should set the error code to UnknownSocketError accordingly. Change-Id: I0dd314788ffc182d6837f9d06b51e41d6de59d7e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Fix -Wclazy-qstring-arg in Windows codeFriedemann Kleint2017-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | plugin\qlibrary_win.cpp(119,55): warning: Use multi-arg instead [-Wclazy-qstring-arg] plugin\qlibrary_win.cpp(155,55): warning: Use multi-arg instead [-Wclazy-qstring-arg] plugin\qlibrary_win.cpp(168,55): warning: Use multi-arg instead [-Wclazy-qstring-arg] socket\qlocalserver_win.cpp(228,61): warning: Use multi-arg instead [-Wclazy-qstring-arg] Change-Id: I0feadd3a5cce5ac2ba09630a38b867981d48a391 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-301-4/+2
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/thread/qsemaphore.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-281-4/+2
| |\ | | | | | | | | | Change-Id: Iede384644c3df5ee01b701806dfdb586dd6bb138
| | * QUdpSocket: Work around WSARecvMsg quirk relating to no control blockThiago Macieira2017-11-251-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WSARecvMsg does not return the sender in WSAMSG::name if WSAMSG::Control isn't set. This makes no sense, so I'm assuming it's an API quirk we need to work around. [ChangeLog][QtNetwork][QUdpSocket] Fixed a regression from Qt 5.9.3 caused by an apparent Win32 API quirk we triggered when using readDatagram(), resulting in an invalid QHostAddress sender address. receiveDatagram() was not affected. Task-number: QTBUG-64718 Change-Id: I71488efd29b645f7b228fffd14f9d84cc205c4b3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-231-9/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-091-9/+11
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qwindow.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowssystemtrayicon.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
| | * QNativeSocketEngine/Win: fix getting the datagram destinationThiago Macieira2017-11-041-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like I never even tested this. There were two problems: 1) when we asked for the recvmsg and sendmsg functions, we used the wrong variable (socketDescriptor was still -1) 2) we extracted the destination addresses, but never set them in the QIpPacketHeader object The added tests confirm that this works on Windows, Linux, Darwin, FreeBSD. There also seems to be a problem, obtaining the destination address on an IPv4 socket with a dual-stack sender (I can reproduce that on FreeBSD, macOS and Windows, plus an old version of Linux). Task-number: QTBUG-63605 Change-Id: I638cf58bfa7b4e5fb386fffd14ea732bddbc0c42 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | QAbstractSocket: Add socketOption for the Path MTUThiago Macieira2017-11-146-6/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allow retrieving the value of the known PMTU for the current socket. This works on Linux (IPv6 and IPv4) and FreeBSD (IPv6 only) -- the other OSes don't have the necessary API. Note: do we need add IP_MTU_DISCOVER? Change-Id: I6e9274c1e7444ad48c81fffd14dcaf97a18ce335 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | 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>