summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* employ QMAKE_USE: LIBS += -lfooOswald Buddenhagen2016-08-191-1/+1
| | | | | | | | | | | | this switches all instances of LIBS[_PRIVATE] += -lfoo where a config tests exists for foo. this removes some code duplication between tests and project files (in case of conditionals), and ensures that the projects always actually use the libraries configure has found. Change-Id: Ia7e80c8db5f329290c7f1a4e03a8bf78882a687e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* HTTP/2 - do not set END_HEADERS if we have CONTINUATIONsTimur Pocheptsov2016-08-172-1/+2
| | | | | | | | | Setting END_HEADERS flag on a HEADERS frame means we do not have CONTINUATION frame(s). So do NOT set it too early, only if we fit into a single frame. Change-Id: I891a2db227cee59e4eacfe7c2f18b431cd85fe47 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-166-15/+19
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-135-7/+7
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/io/qsettings.cpp src/corelib/itemmodels/qstringlistmodel.cpp tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
| | * Doc: Change instances of '(Mac) OS X' to 'macOS'Topi Reinio2016-08-125-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change the occurrences where the Mac platform is discussed to use a macro \macos, which expands to 'macOS'. This helps with adapting to future renaming. Update the instructions on mac-specific Q_OS_* macro usage. Add a \target for the old 'Qt for OS X' topic to keep links working for other documentation modules that try to link with the old name. Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * | QAbstractSocket: prevent waitForReadyRead() from early exitAlex Trotsenko2016-08-111-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to documentation, waitForReadyRead() returns 'true' if the readyRead() signal is emitted and there is new data available for reading. Thus, waitForReadyRead() is being blocked in cycle until canReadNotification() will return 'true'. This patch adjusts canReadNotification() to return 'true' only when new data arrives on buffered socket that ensures waitForReadyRead() to succeed correctly. Change-Id: Ic38c4a4dd8ef9128f04b6c1d5f3d03068f6c9894 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-101-1/+1
| |\| | | | | | | | | | Change-Id: I1a63523de158757964b6fb5ea026cf69a6c5ddcf
| | * QNativeSocketEngine::option(): return a correct value on invalid callAlex Trotsenko2016-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Instead of 'true', it should be '-1'. Change-Id: I5e8f99153da68d34b37477ef4cedbc447fba347f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | HTTP/2 - fix QT_NO_SSL buildTimur Pocheptsov2016-08-153-22/+19
| | | | | | | | | | | | | | | | | | | | | | | | Recently enabled cleartext fails to build with QT_NO_SSL - fix test and QNAM. Change-Id: I467edab8e4eb5113715ad2d3b3022e0d8c027de8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QSslDiffieHellmanParameters: make fit for releaseMarc Mutz2016-08-123-33/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add missing \since 5.8 on free functions - fix \relates of qHash to point to QSslDHP, not QHash, which is in another module - API fix: use named instead of unnamed ctors - share code between ctors - API fix: add inline move ctor (for now, this requires using a naked d pointer, which isn't much of a problem, since the class is immutable). Change-Id: Ic30f9c3c03b8a3798e0676e38991ead85c587214 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | | Document HTTP2Allowed attributeTimur Pocheptsov2016-08-111-0/+8
| | | | | | | | | | | | | | | Change-Id: Ia318bf4b73f4716106f60370ed9ddff94f677eba Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | | Enable cleartext HTTP/2 and bring the auto-test back to lifeTimur Pocheptsov2016-08-115-22/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HTTP/2 does not require TLS connection, it can work in a cleartext mode. Plus at the moment only OpenSSL backend allows HTTP/2 negotiation via ALPN/NPN (and none of our CI configurations with OpenSSL supports these extensions, rendering HTTP/2 auto-test useless). This patch implements cleartext HTTP/2 ('h2c') in 'direct' mode - this is allowed if a client has a prior knowledge that HTTP/2 is supported by a server. Change-Id: I4978775e9732c40bc77f549b83bb4a5d1761887e Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | http2frame - do not rely on a socket's bufferTimur Pocheptsov2016-08-113-85/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Whenever we have a read notification, read this data, even if it's not enough for a frame's header - otherwise, QNAM can use a socket in an Ubuffered mode and FrameReader can potentially fail to read anything correctly. - Do not call/rely on bytesAvailable and do not try to invoke _q_receiveReply in Qt::QueuedConnection mode, instead try to read until we end up in an incomplete frame or some error. Change-Id: I7f44ba9e34bc64f3e26bd29080f0050da635b3ae Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-092-3/+3
|\| | | | | | | | | | | Change-Id: I36e6b890b65d12bf6931757540bcc9c553b5eb8f
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-052-3/+3
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: I6f3878b204464313aa2f9d988d3b35121d4d9867
| | * Remove unneeded ';' after some macrosKai Pastor2016-08-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The unneeded ';' triggered warnings in pedantic compilation mode. Change-Id: Id2324823e138560bb25234306601253d7bbd713e Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * QLocalSocket/Tcp: open device before making a connectionAlex Trotsenko2016-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to QLocalSocket's documentation, connectToServer() must initiate a connection attempt after opening the device. Otherwise, if a connection succeeds immediately, connected() signal will be emitted on closed device. So, this patch ensures that TCP-based implementation behaves correctly. Change-Id: I4cc9474815e091a1491a429a6dc17f9cf0154f58 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Revert "Implement protocol upgrade for HTTP/2 enabled requests"Timur Pocheptsov2016-08-048-149/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 12d71f4ea20415ff2274e1e90f9e4d5a8b935d7f. This change is breaking a build + incomplete as my test revealed. Will have to re-try later. Change-Id: I7ea089093a832aa5822caaaac56e62f5fda4df17 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | Implement protocol upgrade for HTTP/2 enabled requestsTimur Pocheptsov2016-08-038-28/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without ALPN/NPN (== without OpenSSL) we can negotiate HTTP/2 using the protocol upgrade procedure as described by RFC7540. Since there is no TLS handshake, after our http channel was connected we first send an 'augmented' HTTP/1.1 request - its header contains additional 'HTTP2-Settings' and 'Upgrade' (to 'h2c') fields. If we receive reponse 101 (switch protocol) we re-create a protocol handler and switch to HTTP/2. Task-number: QTBUG-50955 Change-Id: I36e9985e06ba76edaf7fdb22bb43770f8d593c61 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Fix some syntax issues in SCTP implementationAlex Trotsenko2016-08-033-5/+10
| | | | | | | | | | | | | | | | | | Change-Id: I718fd060e313d544a5470fa20183db04ef89b1ca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Fix grammar issues in SCTP documentationAlex Trotsenko2016-08-024-15/+15
| | | | | | | | | | | | | | | | | | Change-Id: I11bfb20dc3d4db98dccfd3bc680fb1ffbd522508 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/devLiang Qi2016-08-021-10/+3
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-011-10/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure 5.7 now supports clang on android; but dev re-worked configure src/gui/kernel/qevent.h One side renamed a parameter of a constructor; the other added an alternate constructor on the next line. Applied the rename to both for consistency. tests/auto/tools/moc/tst_moc.cpp Each side added a new test at the end. .qmake.conf Ignored 5.7's change to MODULE_VERSION. configure.json No conflict noticed by git; but changes in 5.7 were needed for the re-worked configure to accommodate 5.7's stricter handling of C++11. Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
| | * | QAbstractSocket: ensure bind()+connect() works on delayed closeAlex Trotsenko2016-07-201-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While connecting, the socket goes through the HostLookupState. In this state, the socket engine is not yet created, unless the socket had previously been bound. When it has been bound, we should keep the socket engine even if the user initiates a delayed close by using the write()+close() sequence. Change-Id: Iefebcb33cd72cb49617acbac8e02af9d8209c869 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | fix namespaced buildOswald Buddenhagen2016-08-011-2/+2
|/ / / | | | | | | | | | | | | Change-Id: I37b571db193d444ea60d508375fef89add467d1e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | | QSslDiffieHellmanParameters_dummy - remove Q_UNIMPLEMENTEDTimur Pocheptsov2016-07-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a part of SSL initialization (done by QNAM on the first HTTP get request, for example), 'dummy' Diffie/Hellman parameter's mem-functions constantly and unconditionally print 'Unimplemented code' even without user actually calling these unimplemented methods. This is not just annoying, (just realized I saw this 'Unimplemented code' many times today) this also breaks several our auto-tests (xmlpatterns/qquickimage for example) - the ones that expect output to be empty. Task-number: QTBUG-55003 Change-Id: I5e4822e9783de32aa4b00843a9916eafea3689c0 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Store QSslKey in specific key format to provide more details for keyLars Schmertmann2016-07-283-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a TLS handshake the ephemeral server key is saved in the ssl configuration. Clients who want to get the length or algorithm of the key only get "Opaque" and "-1" as a result because the key is always stored as "Opaque". This change converts the key to specific type so more details are available and the client don't need to convert the handle by hand. Change-Id: I60f90fc2c1805e528640d391b20c676b6eeeb49e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | | Introduce SCTP sockets supportAlex Trotsenko2016-07-2731-117/+1626
| | | | | | | | | | | | | | | | | | | | | Add protocol-specific code and the QSctpServer, QSctpSocket classes. Change-Id: Ie9a1d87bd1fda866a2405043d1c15c12ded5a96e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | HTTP/2 - fix 'GOAWAY' frame size validationTimur Pocheptsov2016-07-251-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Found while implementing cleartext http2 (and sending some erroneous frames) - GOAWAY can have some 'opaque debug information payload' so the frame's size is at least 8 bytes, but can be more. Change-Id: I90fb8a3df22768673c4f40ba3bf6a3f5ffe33058 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Add missing overloads for custom verbsRichard J. Moore2016-07-222-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | When support for custom verbs was added the overloads for the various body data options were not. Task-number: QTBUG-54868 Change-Id: I1a495023d957fc71d1e3b77997a2b4b8531c0a0e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/devEdward Welbourne2016-07-226-25/+29
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-07-196-25/+29
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp qmake/library/qmakeevaluator.cpp qmake/library/qmakeevaluator.h qmake/project.h QMakeEvaluator: * evaluateConditional(): one side changed return type, the other changed a parameter type. * split_value_list(): one side changed a parameter adjacent to where ... * expandVariableReferences(): ... the other killed one overload and changed the survivor src/corelib/io/qlockfile_unix.cpp One side changed a #if condition, the other moved NETBSD's part of what it controlled. src/corelib/tools/qdatetime.cpp One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the other moved it from the private class to the public one, in the midst of the "short date-time" optimization, which confused diff entirely. One side changed a QStringLiteral to QLatin1String, the other rewrote adjoining code. src/network/kernel/qauthenticator.cpp Both rewrote a line, equivalently; kept the dev version. src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h One side changed #if-ery that the other removed. tools/configure/configureapp.cpp One side added a check to -target parsing; the other killed -target. 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 tests/auto/testlib/selftests/expected_cmptest.xunitxml Regenerated using generate_expected_output.py I note that quite a few other expected_* come out changed, now. There was no git-conflict in src/widgets/kernel/qformlayout.cpp but it didn't compile; one side removed some unused methods; the other found uses for one of them. Put FixedColumnMatrix<>::removeRow(int) back for its new user. Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-152-8/+7
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakeevaluator.cpp One side changed the iterator to use ranged-for, the other changed its body; they only conflicted because the latter had to add braces around the body, intruding on the for-line. Trivial resolution. Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
| | | * QSslSocketBackendPrivate: Remove QString warningsGabriel de Dietrich2016-07-121-6/+5
| | | | | | | | | | | | | | | | | | | | Change-Id: I2ab758fe61ea1ba9b84672ac05ac219b85e3de6a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | | * Q_(U)INT64_C is not a type, so don't use it as if it wasMarc Mutz2016-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These expressions only work because they contain no non-parenthesized commas and an int literal is last. Fix by wrapping only the integer literal in Q_(U)INT64_C. Change-Id: I6b8e508b6c7c022f4b3342f65c26aab89ce17702 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | Optimize string usageAnton Kudryavtsev2016-07-151-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QStringBuilder more. Use QL1S directly, without QString construction. Change-Id: Iad844391367681fc1013b9725403d009e7c346e6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | Use QStringLiteral more judiciouslyAnton Kudryavtsev2016-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace it with QL1S in QStringBuilder expressions and in overloaded functions. Replace patterns 'QString::number() + QStringLiteral' and 'QStringLiteral + QString::number()' with QString::asprintf. Saves some text size. Change-Id: Ib39b2332264dfc3df04e77f2c101b47a1030cef4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | Replace QString::trimmed() with QStringRef::trimmed()Anton Kudryavtsev2016-07-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... where it's possible. Reduce allocations. Change-Id: I023adfd316f94948fe50749f60bf55748dca56e2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | QSslSocket: reset connection parameters on disconnectAlex Trotsenko2016-07-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise socketDescriptor(), localPort(), localAddress(), peerPort(), peerAddress(), and peerName() remain uncleared until close() is called. This could take place when the connection is closed by the remote endpoint or the user calls disconnectFromHost(). After disconnecting, connection parameters are no longer valid, while I/O device is still opened and may have pending data for reading. Usually, the user reads all incoming data and closes the device independently. Change-Id: Ic898851c39137faf64019949910f0d94ebb79df7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-043-8/+9
| | |\| | | | | | | | | | | | | Change-Id: Ibd81cd1df4a0650d93fcb556a57be90be2e1f569
| | | * Replace LLINDEX macro not present on all BSDs with the codeRalf Nolden2016-07-031-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FreeBSD < 10 doesn't have the LLINDEX macro either in net/if_dl.h, so besides OpenBSD yet another condition to declare the LLINDEX macro for systems where it isn't present does make it more complicated than replacing its usage with the actual code. Change-Id: I7e8ef3e265564526e05ec3115f9fa765d399f045 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * QSslSocket: improve documentation of the supported protocolsGiuseppe D'Angelo2016-07-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) To describe a protocol version we should use an "ordinary" name, not use the values out of the QSsl::SslProtocol enum. 2) Say that we support the latest stable TLS version (1.2, not 1.0). 3) Fix a statement about which protocol is the default one. Change-Id: I18732914d55060a0c3920f7082f986c262a71ded Reviewed-by: André Klitzing <aklitzing@gmail.com> Reviewed-by: Richard J. Moore <rich@kde.org>
| | | * QSslSocket::transmit (macOS/iOS) - do not use invalid contextTimur Pocheptsov2016-06-301-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. QSslSocketBackendPrivate::transmit can invalidate SSL context causing subsequent SSLWrite or SSLRead calls to fail; these report errSecParam (as null context is an invalid parameter) spuriously, when we should rather report the cause of invalidation. The OpenSSL backend can trigger this when it aborts connection during an SSL handshake, on an sslErrors signal. As transmit() emits readReady(), a directly connected slot can trigger the same problem if it aborts or closes. 2. If during peer verification (and in checkSslErrors) we disconnect on sslErrors signal, peer verification must be considered failed and should not continue handshake/set connectionEncrypted. Task-number: QTBUG-52975 Task-number: QTBUG-53906 Change-Id: Iacd3b489a4156e25ef3460ace40d21f34a946bed Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | Make moc obey the preprocessor environment variable for include pathsThiago Macieira2016-07-201-0/+4
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C preprocessors augment their standard list of include paths from the environment: Unix preprocessors use $C_INCLUDE_PATH (for C) and $CPLUS_INCLUDE_PATH (for C++), plus CPATH for both, whereas MSVC uses the an environment variable simply called "INCLUDE". Handling this for MSVC is particularly important because the VCVARSALL.BAT script sets the necessary #include paths in the environment for important things. Without that being parsed, moc won't find some #defines, like WINAPI_DESKTOP_FAMILY. [ChangeLog][moc] qmake and moc now cooperate to use the Visual Studio environment variables (set by the VCVARSALL.BAT script) to find system include files. A possible consequence is that moc parses application headers slightly differently, depending on #if conditions that depended on macros that previous versions had not seen #define'd. Implementers of other buildsystems are advised to pass the --compiler-flavor=msvc option to moc. Change-Id: I7e06274214d1939b0124e5b4bf169cceaef9ca46 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Add "We mean it." warning to HTTP2 protocol handler headersFriedemann Kleint2016-07-134-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtNetwork: qtbase/src/network/access/http2/http2frames_p.h does not have the "We mean it." warning QtNetwork: qtbase/src/network/access/http2/http2protocol_p.h does not have the "We mean it." warning QtNetwork: qtbase/src/network/access/http2/http2streams_p.h does not have the "We mean it." warning Amends change b2c0f9713c1c39bc3214df49f0d2b44bcc84d790. Task-number: QTBUG-50956 Change-Id: Ia266a4f8625d89745b3a2dcaff6b15a712e9cadc Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | | Remove SSL includes from qhttpnetworkconnection_p.hFriedemann Kleint2016-07-124-13/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, qsslcontext_openssl_p.h pulls in an unsanitized windows.h, causing the infamous min/max macros to be defined, requiring a #define NOMINMAX in qhttp2protocolhandler.cpp. This in turn breaks the MinGW developer build since that has NOMINMAX globally defined: access\qhttp2protocolhandler.cpp:40:0: error: "NOMINMAX" redefined [-Werror] Remove the include, adding missing forward declarations and include directives to the source files. Change-Id: Ic1c2c711d87599b15ad6e2d87eae7153a44ace47 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | | HTTP2 protocol handlerTimur Pocheptsov2016-07-0821-12/+2688
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add HTTP2 support in QNAM - QHttp2ProtocolHandler + aux. classes. [ChangeLog][QtNetwork] Added support for HTTP/2 protocol Task-number: QTBUG-50956 Change-Id: I3a119cfbb1fb3118d9003225f5e54b46ae2829b6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QNativeSocketEngine/Win: fetch connection parameters only onceAlex Trotsenko2016-07-081-40/+44
| | | | | | | | | | | | | | | | | | | | | | | | Exclude sections of code that relate to 'Connecting' state from being executed in 'Connected' state. Change-Id: I5e7d28b74dcd9c87c37b4871cc90afc200b2dab9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Fix/adapt the uses of {to,set,from}Time_t in the qtbase source codeThiago Macieira2016-07-063-22/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move those to the equivalent {to,set,from}SecsSinceEpoch(), except for the cases that did QDateTime::currentDateTime{,Utc}().toTime_t. Those are best implemented with QDateTime::currentSecsSinceEpoch(). Change-Id: Ib57b52598e2f452985e9fffd145a366c92cfda20 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Add qtnetworkglobal.h and qtnetworkglobal_p.hLars Knoll2016-07-03106-15/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. That header will later on #include the configuration file for Qt Network. For now it defines the Q_NETWORK_EXPORT macro for this library. Change-Id: I9c45d425baf881c431ed71fd457c7feb2c123855 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>