summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* Fix unintended source compatiblity break in QSslSocketShane Kearns2012-02-021-0/+1
| | | | | | | | | | | QSslSocket overrides one version of QAbstractSocket::connectToHost. Since these functions were made virtual, this now hides the other overloads. Added a using statement to make the other overloads visible. Change-Id: Ia48fdc9bd67936c75c25bb24dabd26a723bb7a05 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Call start() even when bearer is not compiled.Xizhi Zhu2012-02-021-7/+5
| | | | | | | Otherwise, the HTTP request won't be sent if bearer is not compiled. Change-Id: I9a8171fde6fe5b2db0405b4af6e1d52ac4528502 Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* Remove one un-used variant.Xizhi Zhu2012-02-021-1/+0
| | | | | Change-Id: I325451f2f346cc75f23703118b451b9c7398baea Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* Don't include config.tests/unix/openssl/openssl.priBradley T. Hughes2012-02-021-4/+0
| | | | | | | This file was removed in commit ba9302b8a9b6b50f37987261c1ade9af2ade2d3c Change-Id: Ib3a70877f6f6848c8cf072faf13da93abbe186f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QBasicMutex instead of Q_GLOBAL_STATIC QMutexOlivier Goffart2012-02-013-14/+7
| | | | | | | | | | | | | | QBasicMutex is a POD and can be used as a static global object. in qpicture.cpp factoryLoader is used only once, and under the mutex, so there is no need for Q_GLOBAL_STATIC for it, it can be a function static in qhostinfo_unix.cpp the code seemed wrong while compiled with namespace and QT_NO_GETADDRINFO. I also could get rid of one include because it was included earlier. Change-Id: I3c700203c3e067266c20733f4bda8031446dbb86 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Prevent data loss when an ssl socket is closed by remoteShane Kearns2012-02-012-12/+22
| | | | | | | | | | | | SSL context was destroyed on disconnect. This makes it impossible to decrypt buffered encrypted data. So if there is encrypted data in the receive buffers, then don't destroy the ssl context until the socket is destroyed. Task-Number: QTBUG-23607 Change-Id: I16a7b4fa006647ec73049c90cdbc72686696850f Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix QDnslookup build on FreeBSDJeremy Lainé2012-02-011-3/+1
| | | | | | | | | Unify the includes for resolver function on unix-like platforms to avoid build failures on BSD platforms. Change-Id: I9accd7077d5a319a2c93642e011492d0fc779394 Reviewed-by: Holger Freyther <holger+qt@freyther.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows: Fix inclusion of <windows.h>Friedemann Kleint2012-02-013-3/+3
| | | | | | | | | | | | | - Always use <qt_windows.h> as the last file to be included. - Remove it from some headers, use Qt::HANDLE instead of HANDLE. - Clean up #ifdef, use Q_OS_WIN for Windows/Windows CE. - Add NOMINMAX to qt_windows.h to avoid problems with the min/max macros. - Remove <windows.h> from qplatformdefs.h (VS2005) Change-Id: Ic44e2cb3eafce38e1ad645c3bf85745439398e50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Revert "Put the generated <module>version.h into build tree"Bradley T. Hughes2012-02-011-1/+1
| | | | | | | | | After discussion with Liang, I'm reverting it as he requested. This change put every header into the SYNCQT.HEADER_FILES twice for in-source builds, and the qtMODULEversion.h header did not include a path component. This reverts commit 2fbc45b58bba860abf67fb28aa1319c9f4ededaf Change-Id: Ie84cef19193ce5e49072f1f67a41140d9d2673b8 Reviewed-by: Liang Qi <liang.qi@nokia.com>
* Emit QSslSocket::error in case of openssl gives an error.Jonas M. Gastal2012-02-013-25/+38
| | | | | | | | | | | Create new QAbstractSocket::SocketError value that denotes a error in the SSL library: SslInternalError Create QAbstractSocket::SocketError value that denotes a error in data provided by user cauding an SSL library error: SslInvalidUserDataError Change-Id: I466a9389d9d7052efd8eddd1a2d6067ba26dfddb Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* Removing bad ###Qt5 note.Jonas M. Gastal2012-01-311-1/+0
| | | | | | | | | Implementating this would cause massive SC breakage and give little gain. Change-Id: I56a6d302fdd0e8b53d1f9154f3eaf9e1ee429f9d Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* QDateTime: Deprecate setYMD()John Layt2012-01-311-1/+1
| | | | | | Change-Id: I077332df554fb750666d51486c97724411276679 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix debug format string in windows socket engineShane Kearns2012-01-301-2/+2
| | | | | | | %l has no meaning, should be %li according to the arguments. Change-Id: Ife9ec524109e021ad723865445e80b6bad51a5c6 Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix crashing debug messageShane Kearns2012-01-301-1/+1
| | | | | | | | The debug message could derefence a null pointer, this crashed when running ssl autotests Change-Id: I176aaa9f3cf3c6cc1512cdc34db06d4c79f92e73 Reviewed-by: Richard J. Moore <rich@kde.org>
* Make the pause modes a QFlags.Richard Moore2012-01-304-8/+10
| | | | | | | | | | | The intention is to add additional pause modes over time, this will be easier if we can just test if a particular reason for pausing is turned on. If we don't do this we'll end up having to check for each enum value every time we check what is enabled. Change-Id: I6b08f0e819b5593e3f6463c3dd175eff8625e155 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* Add support for DNS lookups using native APIsJeremy Lainé2012-01-306-3/+1943
| | | | | | | | | | | | | | | | The QDnsLookup class provides asynchronous APIs for performing DNS lookups. For now, the following lookups are supported: - A and AAAA - CNAME as defined per RFC 1035 - MX as defined per RFC 1035 - NS as defined per RFC 1035 - PTR as defined per RFC 1035 - SRV as defined per RFC 2782 - TXT as defined per RFC 1035 Task-number: QTBUG-10481 Change-Id: I46c1741ec23615863eeca3a1231d5e3f8942495e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-30160-160/+160
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Put the generated <module>version.h into build treeLiang Qi2012-01-281-1/+1
| | | | | | | | | It was put in source tree before. Task-number: QTBUG-20439 Change-Id: Ib52d9c2e83ae375aad259ddc74138bbc728b3ed0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Making socketOption/setSocketOption virtual on QSslSocket.Jonas M. Gastal2012-01-281-3/+2
| | | | | | | | Per ### Qt5 comment and the fact that it was already virtual on QAbstractSocket. Change-Id: If2d2b2f9cdec1ef4c5bf625e3ce0d6f2d9a7bdfd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Gives QNetworkCookieJar a virtual API.Jonas M. Gastal2012-01-274-63/+128
| | | | | | | | | | | | | | | | | QNetworkCookieJar now has the following virtual methods: virtual bool validateCookie(QNetworkCookie &cookie); virtual bool insertCookie(const QNetworkCookie &cookie, const QUrl &url); virtual bool updateCookie(const QNetworkCookie &cookie); virtual void deleteCookie(const QNetworkCookie &cookie); Their implementation is such that the behavior the class previously had(in memory storage of the cookies) is mantained. Task-number: QTBUG-23145 Change-Id: I1420894d31e8072eca6903c3c7ffd6f06205a257 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-by: Alexis Menard <alexis.menard@openbossa.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* Style fix for QSslCertificate constructor.Jonas M. Gastal2012-01-271-2/+1
| | | | | Change-Id: I1f128eb9f99ef4d25590bd034762cb8a0e68b075 Reviewed-by: Richard J. Moore <rich@kde.org>
* Removing ### that would cause needless SC brekage.Jonas M. Gastal2012-01-271-1/+1
| | | | | Change-Id: Iaa9cfd709c0ca4192760117ba5ec6d3992804d6a Reviewed-by: Richard J. Moore <rich@kde.org>
* QAbstractSocket / QSslSocket: add API to pause and resumePeter Hartmann2012-01-258-32/+184
| | | | | | | | | | | | | | | pause and resume is currently only supported upon emitting the QSslSocket::sslErrors() signal. The API was added in QAbstractSocket to also support QAbstractSocket::proxyAuthenticationRequired() in the future. This is the first patch to support that feature on the socket level, another patch will follow to support sslErrors() and authenticationRequired() in QNetworkAccessManager / QNetworkReply. Task-number: QTBUG-19032 Change-Id: Ide2918268590ab9a01454ab26cb7fdca3dc840ab Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* bearer: run the bearer engines in their own worker threadShane Kearns2012-01-253-18/+30
| | | | | | | | | | | | | | | | | | | | | | | | The original architecture of the QtNetwork bearer support hosted the engines in the application's main thread, but this causes some problems. If the QNetworkConfigurationManager is constructed in a worker thread, then it is populated asynchronously without any notification when it is done (the app gets incomplete or missing results) Fixing that by restoring the earlier behaviour of using blocking queued connections to wait for the lists to be populated caused a regression, as some applications deadlock because the main thread is waiting on the worker thread at this time. By introducing a dedicated worker thread for the bearer engines, QNetworkConfigurationManager can be safely constructed in any thread while using blocking queued connections internally. Task-number: QTBUG-18795 Change-Id: Iaa1706d44b02b42057c100b0b399364175af2ddb Reviewed-by: mread (cherry picked from commit 5f879c55e531165cc2569b03c3796d0f33d0a0b7) Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Murray Read <ext-murray.2.read@nokia.com> Reviewed-by: Alex <alex.blasche@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-2533-33/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove reference to Symbian in QtNetwork.Xizhi Zhu2012-01-242-5/+0
| | | | | | | Change-Id: Iae377505e36ae1239be7ce52c773dc2a4f4a9767 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make QAbstractSocket's API virtual where needed.Jonas M. Gastal2012-01-242-50/+7
| | | | | | | | | | | | | | | | | | | | The following methods have been made virtual: setReadBufferSize() socketDescriptor() setSocketDescriptor() socketOption() setSocketOption() waitForConnected() waitForDisconnected() Now that these methods are virtual we no longer need the nasty polymorphism workarounds for QSslSocket. Change-Id: I319989b6cdb025ba33d7d53ae90f3a6a3b6b1b7b Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update contact information in license headers.Jason McDonald2012-01-23160-160/+160
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove the useless connManager() function.Xizhi Zhu2012-01-191-13/+8
| | | | | | Change-Id: Ifac0796ec22d0656ccfcf31b8d45b2342c2ee646 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: hjk <qthjk@ovi.com>
* Removing QHttpHeader and QHttpResponseHeader.Jonas M. Gastal2012-01-198-965/+31
| | | | | | | | | QAuthenticator used it for the convinience of QHttpSocketEngine only. QHttpSocketEngine has now been ported to use QHttpNetworkReply to parse HTTP responses. Change-Id: Idf6e70aa76613aad6e3d789d81ca1b4fd73575c2 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Rename all our interfaces from com.trolltech to org.qt-projectLars Knoll2012-01-191-1/+1
| | | | | | Change-Id: I6db7211fcf6b24bd75e360645bbb2fdf1ef8a8bc Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Fix compiler warnings in Qt Network.Friedemann Kleint2012-01-192-3/+4
| | | | | | | | - Missing return value - Wrong format for qint64 Change-Id: Id0de58c85b7c8ed2a62f7237fd23e6c5a5ac92ec Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Remove QNetworkConfigurationPrivate::bearerTypeName().Xizhi Zhu2012-01-192-16/+9
| | | | | | | | | Also, use QStringLiteral instead of QLatin1String. Change-Id: I232fc02a56261929864c2ea66993ef1c74bc1237 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
* Remove the useless undef for "interface".Xizhi Zhu2012-01-191-4/+0
| | | | | | | | "interface" is not used by QNetworkConfiguration. Change-Id: I742fe179d415ab1424bfddb1f6c034fc98c55e61 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Add the missing Q_DISABLE_COPY for public bearer classes.Xizhi Zhu2012-01-192-0/+4
| | | | | | | | | | | QNetworkConfigurationManager and QNetworkSession are QObject, which should not be thought of as values that can be copied or assigned, but as unique identities. Change-Id: I6ff0124a613862c2b411da2df31f03d5033315a9 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Remove QNetworkConfiguration::bearerName().Xizhi Zhu2012-01-182-12/+0
| | | | | | | | | It was added only to maintain source compatibility with Qt Mobility. Change-Id: Iea8d40e401bd1f8d5115268e09b256eacca69ea0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Fixed build break when bearer is disabled.Xizhi Zhu2012-01-163-0/+8
| | | | | Change-Id: I29e88b046f6502c84acc9c6f566ecc328cf24e38 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Cleaning up header includes.Jonas M. Gastal2012-01-135-6/+5
| | | | | | | | | | QNetworkCookie doesn't need to know about QNetworkCookieJar and for QNetworkCookieJar header a forward declared QNetworkCookie is enough. Change-Id: I21145ce0f67a0a6bd68a46a5e757f82105cdf520 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* qdoc3: Don't put a \table in a \valueMartin Smith2012-01-131-10/+19
| | | | | | | | | | | | | | | | | | | | In qdoc, the \value command is meant to document a single value of an enum. e.g. \value TypeOfService Text describing the type of service. It runs until the next \value or a blank line. Although it doesn't say you can't build a \table in the \value text, it doesn't work. For now, the fix is to remove the \table from the \value text and make the table separate from the enum \value list and let the description of the \table refer to the value that it belongs to. Task-number: QTBUG-23599 Change-Id: I88b456dca419a565eece30ba20fe09c0bcd4d98d Reviewed-by: Martin Smith <martin.smith@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove shadowing members in QNetworkReplyHttpImplPrivateAlexander Færøy2012-01-121-2/+0
| | | | | | | Task-number: QTBUG-23512 Change-Id: I072dfde1741a1d32a6125f63e52cc22bc499987f Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
* Fix compilation of Qt itself with QT_NO_DEBUG_STREAMDavid Faure2012-01-123-5/+5
| | | | | | | Change-Id: I07087dff0f109347ea80434f17eeb7cc1c13114c Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Make QFtp private.Jonas M. Gastal2012-01-127-11/+70
| | | | | | | | | All references to QFtp in documentation have been removed, QFtp's documentaiton was marked internal. The QFtp example was removed. Task-number: QTBUG-23199 Change-Id: Ifff83cac069fb350e8ebeae63e605850e65c0c30 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Remove unused QT_NO_TEXTSTREAM.David Faure2012-01-111-1/+1
| | | | | | | | It was checked in a few places, but it didn't actually remove QTextStream, so it was pretty useless. Change-Id: I8eaf28893cd6c7acbe1c0b69d58de90742aee755 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* qlocalsocket_win.cpp: Fix compiler warning.Friedemann Kleint2012-01-111-1/+1
| | | | | | | Change-Id: Ibdb57f99b98b0c603be3c9be043737687034a958 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Update year in Nokia copyright headers.Jason McDonald2012-01-102-2/+2
| | | | | | | | The previous change missed some headers from years prior to 2011, and a few new files were merged after the previous change. Change-Id: Ib7d1a2b7062228c2a5373da64242b2ee1f0981e1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QLocalSocket: make socket descriptor qintptrJoerg Bornemann2012-01-105-12/+12
| | | | | | | | | | | This is consistent with the other socket classes. Also see commit bf7f17060773803f332e8c729a70f47b94243890. Change-Id: Ic4bf01bd4abf778e21fe575c5304f86c9bee82fc Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* SSL - dump failed certificate chains when debug logging is enabledShane Kearns2012-01-091-0/+21
| | | | | | | | | | This is to help us debug problems with CA certificates. Code is not compiled by default, only when QtNetwork is built with QSSLSOCKET_DEBUG defined Change-Id: I404c36bf4c6bf1190f480196038197be30b4b5f9 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Using proper virtual functions instead of Q_INVOKABLE tricks.Jonas M. Gastal2012-01-096-47/+68
| | | | | | | | | This mantains BC between version compiled with and without OPENSSL, which was the reason for the use of "runtime virtuals". Using proper virtuals should make code clearer. Change-Id: I24f141ebaab68c000c2d602b54addbae1679a424 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make (dis)connectTo(From)Host virtual in QAbstractSocket.Jonas M. Gastal2012-01-094-50/+12
| | | | | Change-Id: Ib1dfae4031f00fb331108152a259f6a2756381c9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Removing QHttp class, its tests and its usage in examples.Jonas M. Gastal2012-01-068-3466/+921
| | | | | | Task-number: QTBUG-22750 Change-Id: I161fad772bfb26797e6ee9d69da925b6747c371f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>