summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* Remove misleading documentation about QAbstractSocket::bytesWrittenThiago Macieira2012-09-101-4/+3
| | | | | | | | | | | The signal has nothing to do with any action on the remote side. It is emitted when the class has written the bytes to the operating system. More likely than not, the bytes have not been even sent yet, much less read by the other side. Change-Id: Ia04d37ffc8c0788173d3d29f49c5759bcdef6afa Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Removing duplicate includesSergio Ahumada2012-09-092-4/+0
| | | | | | | Do not include a header more than once Change-Id: Ia2e5d66e72988ad833cf5177a3f8aa988bf510e9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* test: QFtp tests require `private_tests' setSergio Ahumada2012-09-091-1/+1
| | | | | | | Also fixing some includes and re-enabling the test Change-Id: I4a061e106c2e55db39b8000729737a93e3d7714a Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Use QStringList::join(QChar) overload where applicable [QtNetwork]Marc Mutz2012-09-071-1/+1
| | | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: I5b75877ba192fa1357e67fee70dff7c0475991e8 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QtNetwork: bypass proxy for local connectionsJulien Brianceau2012-09-072-9/+12
| | | | | | | | | | | | According to Qt doc, "Network proxy is not used if the address used in connectToHost(), bind() or listen() is equivalent to QHostAddress::LocalHost or QHostAddress::LocalHostIPv6. This is not the case in current implementation. Change-Id: I6b8a40c1e8bd8aad9504d8f939b87eda6e93337c Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Revert "Use true and false in preference to TRUE and FALSE"Sergio Ahumada2012-09-071-6/+6
| | | | | | | | | | | Even though I really think the change was the right thing to do, it seems like Windows people don't like this change because of some Windows Data Types specific rules. This reverts parts of the commit 56d5c909af6473be64a1ae487b45bd444a9a8553. Change-Id: I2c67d9b1bab36fc63937ef386aef56d2a4472a04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Use true and false in preference to TRUE and FALSESergio Ahumada2012-09-051-6/+6
| | | | | | | | The TRUE and FALSE macros are obsolete and should be replaced with true and false (all lower case) respectively. Change-Id: Iee352e8173500683e6319be0abbf5bacf29016e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* fix a mismatch of using QT_NO_NETWORKPROXYJing Bai2012-09-031-0/+3
| | | | | | | | To fix a compile error when QT_NO_NETWORKPROXY is defined. Change-Id: If0433387cff2e6574fe24721a0ce2bfc41b0eb47 Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Doc: Fix docbuild when not using -developer-build.Casper van Donderen2012-09-011-2/+2
| | | | | | | | https://codereview.qt-project.org/#change,33974 only works in the case of a developer build. Not in a normal prefix build. Change-Id: I3a3e5029cefaa9f83c5deb71665f0efa9d812819 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Add missing QT_{BEGIN,END}_NAMESPACESergio Ahumada2012-08-311-0/+4
| | | | | | | Fix src/network/kernel/qnetworkfunctions_wince.h Change-Id: Ia59c1e67f9409abb97fce3fcaa3840e0d77c0978 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Simplify qtbase qdocconfs.Casper van Donderen2012-08-311-15/+2
| | | | | | | | | | We should be using the global qdocconf for the common variables. This change also allows you to just specify -installdir without using a templatedir. Change-Id: I207d279d9b5199212e896fc5ccab5c212b1896c6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Add support for explicit TLS 1.1 and 1.2Brendan Long2012-08-295-0/+48
| | | | | | | | | | | | Add SslProtocol enums TlsV1_1 and TlsV1_2 and use the appropriate OpenSSL methods when they're selected (TLSv1_1_client_method, TLSv1_2_client_method, TLSv1_1_server_method and TLSv1_2_server_method). This allows us to explicitly use TLS 1.1 or 1.2. Task-number: QTBUG-26866 Change-Id: I159da548546fa746c20e9e96bc0e5b785e4e761b Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* SSL: remove unneeded volatile qualificationsMarc Mutz2012-08-291-2/+2
| | | | | | | | | | These two variables are only ever accessed under mutex protection, and don't otherwise look like they could be changed by the hardware, so remove the volatile qualifier. Change-Id: I714451bb3e80778b971a901d53fe13e1b01dd84f Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDnsLookupRunnable: replace a volatile bool with an atomic intMarc Mutz2012-08-291-4/+4
| | | | | | | | | | | | Since there is non-atomic data that is protected by 'triedResolve', the (outer) read from triedResolve needs to have acquire, and the store needs to have release semantics. The release implied by the mutex unlock is not good enough because it only synchronises-with the locking of the same mutex, which not all threads execute. Change-Id: If46b3ea6ccfdd66ca41ce44d4f45bef2c2c30f72 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QHostInfo: replace a volatile bool with an atomic intMarc Mutz2012-08-292-8/+10
| | | | | | | | | | | | A volatile bool read/store is documented on MSVC to have acquire/release semantics, respectively, but that doesn't need to be true for MinGW, so use explicit memory ordering. Apply the same fix to the Unix implementation, too. Change-Id: Ica466cec50beed830aafa4e3384d82f02e1a47e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Exclude the examples/widgets/doc dir for all but widgets.Frederik Gladhorn2012-08-291-0/+2
| | | | | | | | There are too many references to the QWidget lib documentation in there. On the other hand this keeps snippets working. Change-Id: I7dd63b7fba1758accea2663f7b427940a8857e32 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* QNetworkDiskCache: avoid a 31-bit truncationMarc Mutz2012-08-231-1/+1
| | | | | | | | | Network operations whose content size exceed 2G are not unheard of, and they probably shouldn't be cached, so use the correct toX() function, one that doesn't truncate the value in the header. Change-Id: Ie4e68a3120c85952dd2cc9feb73c5844e20b9aa3 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QtNetwork: declare some classes as sharedMarc Mutz2012-08-2314-2/+38
| | | | | Change-Id: Ib3eaba59836529ad0cf8e4353b54dd0cd31fd1ad Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* A few more random documentation fixesShawn Rutledge2012-08-231-2/+2
| | | | | | | @p replaced by \a, \QD replaced by {Qt Designer}, couple of enums etc. Change-Id: I315510690bf52e42db519292b4122fa24c73bbc9 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix typo in QAbstractNetworkCache documentation.Mitch Curtis2012-08-211-1/+1
| | | | | | | | "used be" => "used by" Change-Id: Ibde738facab357d21604779f8b2145d32815ed66 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add Q_DECL_NOTHROW to some qHash functionsThiago Macieira2012-08-201-0/+1
| | | | | | | | | | | | The hashing functions for QDateTime and QHostAddress did not get the noexcept keyword because they might allocate memory. QDateTime doesn't do it now, but it could in the future. QHostAddress does allocate memory today. Change-Id: Ia5f80942944bfc2b8c405306c467bfd88ef0e48c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add missing #include <qmetatype.h>Thiago Macieira2012-08-201-0/+1
| | | | | | | There's a Q_DECLARE_METATYPE at the end of this file. Change-Id: Ib63aa4397ccba8740d46cf1ee7af712f75d05765 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* doc: Fixed qdoc errors in SSLMartin Smith2012-08-182-12/+14
| | | | | | | | | Fixed some bad camel case, marked some parameters with \a, and changed a \enum to a \typedef. Removed some obasolete text. Change-Id: I1e69dd9f3b74129230770addc80fe1c125faf268 Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix sockets for Windows CEAndreas Holzammer2012-08-141-2/+2
| | | | | | | | | Version numbers for CE are higher then for the desktop, so insert a check for this, as the api is not working as for windows 7 and above. Change-Id: I79baba9183e11c714cffd0bb43327c197043d6e0 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Doc: Added a Qt Network landing page.Jerome Pasion2012-08-104-11/+43
| | | | | | | | | | -fixed generated HTML file names -removed qt-network group in qt/qtdoc and removed \ingroup instances Change-Id: Ida5ded5da30e6db1978382f6742a5da8036e055e Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Martin Smith <martin.smith@nokia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
* rename qt_module_config.prf => qt_module.prfOswald Buddenhagen2012-08-081-1/+1
| | | | | | | this is more logical, following the qt_plugin and qt_tool scheme. Change-Id: Ib3b2abec6728cdab260e15128b1cd78e8e6f5d6a Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Add possibility to add OpenSSL, DBUS, MySQL path under WindowsAndreas Holzammer2012-08-071-0/+5
| | | | | | | | | | | Under Windows it's quite possible that OpenSSL, DBUS or MySQL is not installed into a central place. If -I and -L is passed at configure time, it is added to all targets, and if that path contained a conflicting header things would go wrong. Change-Id: Ic3338c49aa6eaa91b3abf5341e709ef604bf7aab Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix some documentation inconsistency in QtNetwork.Stephen Kelly2012-08-062-21/+21
| | | | | Change-Id: Id3e25480d4a8529813e02dc3d19f553a9263a363 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QtNetwork: Handle FD_CLOSE on WindowsMartin Petersson2012-08-016-0/+52
| | | | | | | | | | | | | We need to handle FD_CLOSE separately on Windows as this will be sent only once. When we get FD_CLOSE we need to check if there is more data available for reading. It there is this might indicate that there is another FD_READ that we need to handle after the FD_CLOSE. So in this case we will manually create another close event. Task-number: QTBUG-19409 Task-number: QTBUG-25386 Change-Id: Ie19906bc3f64fb6a85a508a5ab12caac5d70ccdb Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Adding missing QT_BEGIN_HEADER/QT_END_HEADERSergio Ahumada2012-07-311-1/+5
| | | | | Change-Id: I1144497ec8376ec41c714b7a55c05637b6feee66 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* add configure options for debug/release OpenSSLPeter Kümmel2012-07-311-1/+12
| | | | | | | | | msvc cannot use the same library for debug and release builds if openssl libraries are linked statically into the network library. Change-Id: Ic27ede2d9531b94aff4c50c1699947ce72caf286 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QtNetwork: Better detection of connection failures on WindowsMartin Petersson2012-07-301-21/+41
| | | | | | | | | | | | | | | If the error code from WSAConnect is WSAEWOULDBLOCK, then the operation proceeds but the outcome is not known at that time. We then check SO_ERROR's value to detect errors. But if that call returns 0 this could indicate that the value is still not know. In this case we try one more time to increase the chance of getting the correct value. This fixed the tst_QNetworkReply::getFromUnreachableIp auto test on Windows. Change-Id: I25008aca062b2f823e3d93ebb0ae456d7e4a6ecc Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QtNetwork: unbreak QT_NO_SSL buildMarc Mutz2012-07-262-10/+8
| | | | | | | | | | | The Q_DECLARE_METATYPE()s were outside of #ifndef QT_NO_SSL for classes that are defined inside. Expand the #ifndef block. Change-Id: I45b73a24032fb2a79fd80d91282b782daa8a8f68 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* QtNetwork: use nullary version of qRegisterMetaType<T>("T")Marc Mutz2012-07-2517-21/+35
| | | | | | | | | | | | | | | | | Using the nullary version has the advantage that multiple calls during a program run are much more efficient, since an inlined atomic is used to store the result. It also ensures that Q_DECLARE_METATYPE(T) has been used, whereas qRegisterMetaType<T>("T") will happily register anything. So I've added the macro where it was missing, or moved it to a central place when it existed hidden. In tst_qnetworkreply, this became a bit tricky, because a private header is conditionally included, so moved the Q_DECLARE_METATYPE() into a conditional section, too. Change-Id: I71484523e4277f4697b7d4b2ddc3505375162727 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Remove obsolete or commented use of Q_DECLARE_METATYPE.Stephen Kelly2012-07-244-7/+0
| | | | | Change-Id: I15bc845801b9f84a9252a0092fbd69f0e1b3f4ea Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Replace Q_REGISTER_METATYPE in QAbstractSocket::stateChanged doc.Mitch Curtis2012-07-231-1/+1
| | | | | | | | Should be Q_DECLARE_METATYPE. Task-number: QTBUG-24692 Change-Id: I9c8b8d503fba254661e8f0d72855758d5d03ada1 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* QtNetwork: normalize signals/slotsMarc Mutz2012-07-183-9/+9
| | | | | | | | | | This is the result of running util/normalize --modify from Qt 4.7 with manual review. Change-Id: I3f89d5138ea9905c42ed581991426e72c90d4069 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* removing QT_NO_URLINFO and using QT_NO_FTP insteadTasuku Suzuki2012-07-172-4/+4
| | | | | | | | | | | URLINFO was removed from qfeature.txt but QT_NO_URLINFO macro was not removed. As QUrlInfo is now private and only used for FTP, the class can be disabled when FTP is disabled. Change-Id: Ic63b066f8ff9ad1eea0073ab75b622e5739ac5a8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix some spelling errorsSergio Ahumada2012-07-115-8/+8
| | | | | | Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Avoid loading multiple bearer plugins of the same keyJiang Jiang2012-07-111-0/+5
| | | | | | | | There may be duplicated debug plugins, loading both will cause crash. Change-Id: Icc2a3643c318844bc7f2e149a6434e95de2449b2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtNetwork: add member-swap to shared classesMarc Mutz2012-07-0628-0/+202
| | | | | | | | Implemented as in other shared classes (e.g. QPen). Change-Id: Ib3d87ff99603e617cc8810489f9f5e9fe054cd2a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QNativeSocketEngine: remove compile watning on WindowsMartin Petersson2012-07-031-0/+2
| | | | | | | Remove warning of unused variable. Change-Id: Ia361dcb9081cd47c7018f5e75cdb8eb74f5474d4 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* SocketEngine Windows: If not dual stack, use IPv4 for AnyIPProtocolMartin Petersson2012-07-031-0/+3
| | | | | | | | | If the Windows version doesn't support dual stack then we should bind to IPv4. So we should change the socketProtocol to QAbstractSocket::IPv4Protocol as well. Change-Id: I7f9d0bdd861f82d720e347d3fa968198de720d1a Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QSslCertificate::fromPath fix wildcard handlingMartin Petersson2012-07-031-23/+30
| | | | | | | | | | | | | | The reqExp used to handle wildcards in the path was broken. So we always searched the working directory and not the specified path. Autotest where passing because of a hack used for Windows paths where we removed the first two chars in the path string. This fix will not use nativeSeparators thus removing the Windows hack and fix the regExp to match wildcard chars. Task-number: QTBUG-23573 Change-Id: I56fadbb67f25b8ce9c0f17cb6232e0bdb9148b1c Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Add null httpReply checks to QHttpThreadDelegateShane Kearns2012-07-031-6/+25
| | | | | | | | | | | | | | | | | If a request is aborted while under load, the abort signal can be queued in front of a signal emitted from the httpReply. The abort slot is deleting the httpReply and setting it to null. So when the queued slot is processed the httpReply is null and caused an MMU fault. Removed qWarning from existing null checks, as these are expected if abort is called with precise timing so that it races with the reply finishing on the socket. Task-number: QTBUG-26245 Change-Id: I0a7e0223fda1bc01d117fe8a993c7f6e43fd72ff Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Richard J. Moore <rich@kde.org>
* Make QtNetwork compile with qconfig smallJeremy Katz2012-07-011-0/+15
| | | | | | | Task-number: QTBUG-24816 Change-Id: I8c7965e4498794db93ee51c8511c9a72071ddce3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move the QDataStream operator<< for QPair to qdatastream.hThiago Macieira2012-06-282-0/+2
| | | | | | | | | | QPair is small and is no problem to include from qdatastream.h. However, including QDataStream from qpair.h means including QIODevice and QObject too. Change-Id: I344321e9f68438008ec329a165135c3a346c6058 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Removed flags from SSPI calls which prevented the NTLM authentication from ↵Adrian Carpenter2012-06-281-8/+2
| | | | | | | working Change-Id: I87b085442ef301d9d92def0608a8baaa330522e6 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Add const & to foreach 'iterators'Albert Astals Cid2012-06-272-3/+3
| | | | | | | Change-Id: I8c0600dfd919f45d14a0011f2da9b9fe0b9a0df3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* QNetworkCookie - ignore unparsable expires attributeShane Kearns2012-06-271-4/+3
| | | | | | | | | | As required by RFC6265, if the date can't be parsed then the attribute should be ignored but not the whole cookie. Task-number: QTBUG-15794 Task-number: QTBUG-16798 Change-Id: I2ed2fbbaf2d00b194995349c24b174032a599703 Reviewed-by: Richard J. Moore <rich@kde.org>