summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
...
* | | QSslSocket: Allow disconnections within the connected() signalJocelyn Turcotte2012-10-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing happy eyeballs style network state lookup, we might have to close an SSL socket from its connected signal. This can cause the warning: QSslSocket::startClientEncryption: cannot start handshake when not connected The signal should be emitted after we called startClientEncryption to avoid this warning. In that case it will initialize the encryption and ramp it down right after. Change-Id: I0c8c79cad7f91f0088b87c5e4ee8aafbc688411c Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | | Fix mistakes in QNetworkAccessManager docs.Mitch Curtis2012-10-221-2/+2
| | | | | | | | | | | | | | | | | | Change-Id: I2c797affec9472815003b1a032196c81088e1df6 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | remove explicit load(qt_build_config)s from the librariesOswald Buddenhagen2012-10-191-2/+0
| |/ |/| | | | | | | | | | | .qmake.conf (and previously .qmake.cache) already does that for us. Change-Id: I06cc01fa45921d7bd66dda7a0f88729faeff37bd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Fix spelling mistake in QNetworkDiskCache detailed description.Mitch Curtis2012-10-151-1/+1
| | | | | | | | | | | | Task-number: QTBUG-27291 Change-Id: I620d258a08d670fa27d60575e32f1767525f3ed9 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Fix warnings from syncqt.Friedemann Kleint2012-10-131-0/+4
|/ | | | | | | | Stop processing in internal headers, use correct include syntax. Change-Id: I9dcf1f6f89907986b7b58658be514083f213a3e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Modularize documenation buildTor Arne Vestbø2012-10-102-6/+4
| | | | | | | | | | qdocconf files can now reference $QT_INSTALL_DOCS to pick up e.g. global includes, instead of using relative paths. Qt modules will automatically get a doc target that builds and installs into the right place (including supporting shadow-builds) if they set QMAKE_DOCS before loading(qt_module). Change-Id: Ia408385199e56e3ead0afa45645a059d1a8b0d48 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Implementation of the BlackBerry Qt Proxy support.Andrey Leonov2012-10-083-0/+140
| | | | | | | | An implementation for BlackBerry devices based on the BPS netstatus API. Change-Id: I89deed031d2a867bbd6628bee97f61345b58f1ab Reviewed-by: Peter Hartmann <phartmann@rim.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Qt Network: Cleaned up documentation titlesJerome Pasion2012-10-051-6/+4
| | | | | | Task-number: QTBUG-27449 Change-Id: Ib2f99bf4266f0d75cbfeddd3693a84c88676a18e Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* Workaround MSVC2008 build failure after switching to std::lower_boundGiuseppe D'Angelo2012-09-271-0/+4
| | | | | | | | | | | | MSVC2008 tries to see if a container is fully ordered. This causes a build failure when operator< is not defined between the elements in the container (but is instead defined between the element type and the item passed to std::lower_bound). Change-Id: I093d6f67f64a247f0aae763acb35ee73614f4208 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* 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>