summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
...
* documentation fixesMarcel Krems2012-09-271-1/+1
| | | | | Change-Id: If165933df41e518f5ba6065792676260fd2492b6 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fix MinGW/gcc warning about NOMINMAX being redefinedKai Koehne2012-09-261-1/+1
| | | | | | | | | Commit 5230d62fe added a #define NOMINMAX, which conflicts with a NOMINMAX definition in the MinGW headers. Just use the same definition as in MinGW to fix the gcc warning. Change-Id: Ib21dd323ebbdca5d143e394c7631303e0c72541a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* If accept fails, stop accepting new connections and emit error signal.Jonas M. Gastal2012-09-269-6/+138
| | | | | | Task-number: QTBUG-24778 Change-Id: I6c5b685b3f861a0fafc1475c41bb35cede17d712 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove duplicate words and punctuation from documentation.Mitch Curtis2012-09-262-2/+2
| | | | | Change-Id: I5550c62d412510bc2c5acceb2cae7d2f2ef6a8d3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fixed instances of "to to" in qtbase.Samuel Rødal2012-09-243-3/+3
| | | | | | | Really it should just be "to". Change-Id: I7d0fff334bac3f0ac78adb8131e3bf3df1f1b242 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Centralise handling & ignoring of SIGPIPE in qcore_unix_p.hThiago Macieira2012-09-242-27/+3
| | | | | | | | | | | | | We had two instances of this function in the Qt source code, one clearly a copy of the other, so both had the same thread-safety issue. Instead, let's have one copy and have both write_nosignal() and sendto() call them. Q_NO_POSIX_SIGNALS is also gone. It was only used with Symbian. Change-Id: I0f1354a8e9df8e6b10a02f86a940e3c6d1222087 Reviewed-by: Peter Hartmann <phartmann@rim.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* wrap QLibrary related code with QT_NO_LIBRARYJing Bai2012-09-241-0/+2
| | | | | | | | To fix a compile error when QT_NO_LIBRARY is defined. Change-Id: Ie72b60b8204641fa05f4cdbf66e908cb3526217e Reviewed-by: Jing Bai <jing.bai@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-22193-4225/+4225
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix build under MinGW after 1e3269c0863bfac26be9e9239b6427ea77c6175bKonstantin Ritt2012-09-221-0/+2
| | | | | | Change-Id: I3c8c28ba1016af6351afa5118893133d373cb4e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix network doc links.Frederik Gladhorn2012-09-215-15/+16
| | | | | | | | Change-Id: I319644da80d91c5cf6d247410f022fbfd062a1f3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Fix doc errors.Frederik Gladhorn2012-09-212-2/+2
| | | | | | Change-Id: I9974d870c081620217582fcb6f8b146d208a471c Reviewed-by: Peter Hartmann <phartmann@rim.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
* Move opengl/wid/net example docs to proper folders.Frederik Gladhorn2012-09-211-4/+4
| | | | | | Change-Id: I846439a9cf7ad965ed27a00f98dbc4ff97abe73b Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* Fix typo in docs.Frederik Gladhorn2012-09-191-1/+1
| | | | | Change-Id: Icfafa00062b442903579dd7993c75fffb60187f9 Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Remove qLowerBound usages from qtbaseGiuseppe D'Angelo2012-09-191-1/+3
| | | | | | | | | Replace them with std::lower_bound; this allows for deprecation of qLowerBound. Change-Id: I536e7338eb85ea6c7c1a5bf23121292767927e0b Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Network: Fix mingw-gcc warningKai Koehne2012-09-181-1/+1
| | | | | | | | Fix warning: missing braces around initializer for 'BYTE [6] {aka unsigned char [6]}' Change-Id: Ic247ff0721955c4562ed027fad7cb3786809a840 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Network: Fix gcc warning about qDebug formatKai Koehne2012-09-181-1/+1
| | | | | | | | Fix gcc warnings: 'unknown conversion type character 'l' in format' , and 'too many arguments for format'. Change-Id: Ic7547a5bd5ba0d4c9f115004f250a0f7d3b378cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Disable SSL compression by default.Richard Moore2012-09-182-3/+5
| | | | | | | | | Disable SSL compression by default since this appears to be the a likely cause of the currently hyped CRIME attack. Change-Id: I515fcc46f5199acf938e9e880a4345f2d405b2a3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Fix thread-safety of qt_ignore_sigpipeThiago Macieira2012-09-181-1/+5
| | | | | | | | | | | | | The testAndSet operation would mean another thread could see the value of 1 and proceed to write(2)/sendto(2) before SIGPIPE had been ignored. If the pipe or socket were already closed by then, a SIGPIPE would be delivered to the application with its default action: terminate. Change-Id: I62dc8f5fa14c1dd453d13e4053c642bd78fbc468 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* HTTP header may be damaged - fix, unit testTomasz Duda2012-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | "HTTP/1.1 100 CONTINUE\r\n" If the header from a server is splitted between two packets the first packet contains "HTTP/1.1 100" and the second one contains " CONTINUE\r\n", one space (0x20) is skipped. After processing the line looks in this way "HTTP/1.1 100CONTINUE". QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket) is called twice, if a http header is splitted as above. The function always removes whitespace from the beginning of a packet, even if it is the second part of a http header. QHttpNetworkReply returns QNetworkReply::RemoteHostClosedError due to damaged http header during processing. Improvement of unit test. Task-number: QTBUG-27161 Change-Id: Ifc2949f62473209b4032185effbf5078b4130cda Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* network: Fix missing or improper include guard in headersSergio Ahumada2012-09-1517-26/+34
| | | | | | | | | | Use an include guard in headers to ensure the header is not included more than once. Make the header guard match its file name. Also, cpp files should include their own headers first (but below config.h) Change-Id: Iecf5da23c0f8e6d457f67657b88ef7557bde9669 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Mark (non-public API's) ctor's as explicitSergio Ahumada2012-09-142-3/+3
| | | | | | | | | Make C++ class constructors that can be used with only one required argument 'explicit' to minimize wrong use of the class. Change-Id: I12ad5b6eb1794108c6b7464a2573e84068733b03 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Marked the QUrlInfo class documentation as \internalVenugopal Shivashankar2012-09-131-0/+1
| | | | | | Change-Id: Ib84c9ffc181edf17850d5334c95c035428d31b6c Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Network: Fix gcc warning about conversion from string to wchar *Kai Koehne2012-09-131-2/+2
| | | | | | | | | Fix gcc 4.7 warning: 'deprecated conversion from string constant to 'SEC_WCHAR*' Change-Id: I5df44ffdc0d505789f99b58d68e02b7535ce761b Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Do not include /examples in qdocconfs.Frederik Gladhorn2012-09-111-1/+1
| | | | | Change-Id: I84a925a8be4964fae667f5a2500157283a8057d2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Doc: Centralize more common settings in 1 global qdocconf.Casper van Donderen2012-09-111-36/+1
| | | | | | | | | | All qdocconf settings that should be used by all Qt modules are now in qt-module-defaults.qdocconf. Change-Id: I2a0315a55db3fcbb0160c4392d2da98611043d83 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* 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>