summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkreplyimpl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-13/+13
| | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QNetworkReply: replace a QQueue with a std::vectorMarc Mutz2019-05-151-13/+8
| | | | | | | | | | | | | | | | | | | The 'queue' was never used as a queue: it was populated, and then exchanged into a local copy to be consumed in a loop. This loop used dequeue(), but of course it could just const-iterate the container and dump it as the end, since the member variable was already reset at that point, no-one could tell the difference from the outside. So, no need for a queue. A vector will do very nicely. The loop now uses ranged-for and qExchange(), greatly simplifying the code over the old version. Add another qExchange() call as a drive-by. Change-Id: I6147453dc9edfe9500833627b123bb3a31114651 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Introduce QNetworkConnection/Status/MonitorTimur Pocheptsov2019-05-021-2/+0
| | | | | | | | | | | Private classes to replace broken or even not working at all 'session management' and 'bearer manager' (on at least two major platforms we support). This implementation is macOS/iOS-specific and uses SystemConfiguration framework, or more precisely SCNetworkReachability's part of it. Task-number: QTBUG-40332 Change-Id: Iac5f44c4063c4092b93b8cf2bde3fb2c524855b3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Set 'originalRequest' in QNetworkReplyImplMårten Nordheim2019-04-291-0/+1
| | | | | | | | | | | It's what's returned when calling request() on a QNetworkReply, but for QNetworkReplyImpl (the implementation used for e.g. FTP) it was not set, so it returned a default object. Change-Id: Id82f7920e4268c1a7743e681fc503bcd28889b6e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkReply: fix isFinished() for disabled repliesDavid Faure2018-03-171-0/+1
| | | | | | | | | | When network access is disabled, every QNAM request returns a QDisabledNetworkReply instance, which emits error and finished immediately. However isFinished() was still false, which could confuse application code. Change-Id: Ifd43c86364b11a9583a38fde536e6c09c109b55f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkReply: remove double bufferingAlex Trotsenko2016-05-251-29/+11
| | | | | | | | | | | | Since 5.7 we can write downloaded byte arrays directly to the QIODevice's internal read buffer without any memcpy/alloc overhead. This makes various other buffers redundant, so remove them. Task-number: QTBUG-45926 Change-Id: I577af70f856c9b852b7569a0070ae2bcbb4faaae Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-271-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_win.cpp src/widgets/itemviews/qheaderview.cpp Change-Id: I0a59ade9cd6e91f770fdf298a7d72a41e79fd761
| * _q_networkSessionStateChanged - fix weird logicTimur Pocheptsov2016-04-221-1/+1
| | | | | | | | | | | | | | | | | | a != A || a != B looks suspiciously wrong. Found, unfortunately, only by Coverity (CIDs 152247, 152249). Change-Id: Ia7ec810dde2a3a33ae6fc5644a4eebf279dcffe8 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-251-6/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test configure src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java src/corelib/global/qglobal.cpp src/widgets/kernel/qapplication.cpp src/widgets/styles/qwindowsvistastyle.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp Change-Id: I067083f34e5290aa5f7565e40c30a069cc37b83a
| * QNetworkReplyImplPrivate - potential nullptr dereferenceTimur Pocheptsov2016-04-191-6/+2
| | | | | | | | | | | | | | | | | | | | | | Found by Coverity, CID 11351. If we check 'if (backend)' at one line, not clear why we do 'if (bakcend->canResume())' two lines above without any test. Also, 'delete backend' is noop if backend is nullptr, so ... even this 'if (backend)' is ... not needed. Change-Id: I7a46ce04baeb9251debb7b246954911df58880ca Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | QtNetwork: optimize container usageAnton Kudryavtsev2016-03-031-9/+13
| | | | | | | | | | | | | | | | | | Don't perform lookup twice. Just cache iterator or position. Change-Id: I454fd292614dee62167ff248fc3ddec0f79435b0 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-021-2/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/network/bearer/qnetworkconfiguration.cpp src/plugins/bearer/blackberry/qbbengine.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformtheme.cpp src/plugins/platforms/qnx/qqnxbpseventfilter.cpp src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxnavigatorbps.cpp src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp src/plugins/platforms/qnx/qqnxwindow.cpp src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qwindowsvistastyle.cpp src/widgets/styles/qwindowsxpstyle.cpp src/widgets/widgets/qtoolbararealayout.cpp tests/auto/corelib/global/qflags/qflags.pro tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
| * Do not try to connect to null object if bearer plugin is missingJoni Poikelin2015-11-271-2/+4
| | | | | | | | | | | | | | | | Warning about connecting to null object was printed when bearer plugin is missing when bearer management feature is enabled. Change-Id: Iac33081c5f301862c066eb69ec05ff6d95775c09 Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
* | Use Q_UNLIKELY for every qFatal()/qCritical()Marc Mutz2015-11-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If, after checking a condition, we issue a qFatal() or a qCritical(), by definition that check is unlikely to be true. Tell the compiler so it can move the error handling code out of the normal code path to increase the effective icache size. Moved conditional code around where possible so that we could always use Q_UNLIKELY, instead of having to revert to Q_LIKELY here and there. In some cases, simplified the expressions newly wrapped in Q_UNLIKELY as a drive-by. Change-Id: I67537d62b04bc6977d69254690c5ebbdf98bfd6d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Better debug info for the "_q_startOperation was called more than once" warningsAlbert Astals Cid2015-10-281-1/+1
|/ | | | | | Change-Id: I50a3e5584a1bc2553acd4bbec1b9a290b8475e47 Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-0/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| * Fix hang in qnam when disconnectingLorn Potter2015-09-071-0/+15
| | | | | | | | | | | | | | | | | | | | | | Generate error for network requests when connection gets disconnected. Documentation states that QNAM requests will fail if network is not accessible, so we need to track session state. Task-number: QTBUG-47482 Change-Id: I2c2d348637f72b2a908b438a66aa543a878de1e5 Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | QtNetwork: fix warnings when compiling with QT_NO_BEARERMANAGEMENTUlf Hermann2015-06-191-2/+1
| | | | | | | | | | | | | | | | Resolving d- and q-pointers in code branches where we don't use them is wasteful and leads to compile warnings. Change-Id: Ib5dadd247acfe48722121e0e95ffcac61e7a2e09 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-061-13/+1
|\| | | | | | | Change-Id: If9fd98525b6b4ca07e5e006fc98bf372a73b8a21
| * Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-311-13/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/android-g++/qmake.conf qmake/generators/unix/unixmake2.cpp src/gui/image/qimage_conversions.cpp Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
| | * Remove #ifndef QT_NO_HTTP that does nothingAlbert Astals Cid2015-03-131-13/+1
| | | | | | | | | | | | | | | | | | | | | Change-Id: I9d6771e9da64e59f8a038dd3b506e6293fcb62c0 Reviewed-by: Jan Kundrát <jkt@kde.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | | Remove unneeded check in QNetworkReplyImpl::abort.Florian Bruhin2015-03-051-7/+5
|/ / | | | | | | | | | | | | | | | | QNetworkReplyImpl::abort immediately returns at the beginning of the function when the state is already finished, and the state does not get changed by the code in between - so this condition will always be true. Change-Id: Ia98df7cbecf471c7236b5e17caddd1301b647d2b Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
* | Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* | QNetworkRequest: Add new enum to emit all uploadProgress signalsPeter Hartmann2014-10-041-7/+11
|/ | | | | | | | | ... so that a user can have more fine-grained uploadProgress signal emissions if desired. Change-Id: I9f77fd80c100dbe249beaf3057e6e8974680ec59 Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* QNetworkReply: move "State" enum declaration into QNetworkReplyPrivateMaks Naumov2014-09-091-14/+14
| | | | | Change-Id: If63a029a7a7ef84fc1b4b73f5bab495992ea7e02 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* QNetworkReplyImpl: optimize QRingBuffer allocationMarc Mutz2014-04-101-2/+2
| | | | | | | | | Use QSharedPointer<T>::create(), which co-locates the refcount with the payload in a single memory allocation, instead of QSharedPointer<T>(new T), which causes two allocations. Change-Id: I84980e98c4fe9773f12533983937eafa0b0ab250 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-1/+1
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Add an encrypted() signal to QNetworkAccessManager and QNetworkReply.Richard Moore2013-02-191-0/+8
| | | | | | | | | | | Add an encrypted signal to QNAM and QNetworkReply to allow applications to perform additional checks on the certificate chain beyond those done as part of the standard SSL validation. This allows things like certificate change notification to be implemented for QNAM as they can be for QSSLSocket currently. Change-Id: I693e3e6fec8b7040379b7e7f1f819550e6b2617f Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Doc: Fix module name formatSze Howe Koh2013-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | 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>
* QtNetwork: use nullary version of qRegisterMetaType<T>("T")Marc Mutz2012-07-251-3/+1
| | | | | | | | | | | | | | | | | 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>
* choke uploadProgress signalsShane Kearns2012-06-141-1/+13
| | | | | | | | | | | | | | | | | | The QNetworkReply::uploadProgress signal is intended for updating UI elements such as a progress bar. Limit the signal emissions to 10 per second to prevent overloading the UI with updates. As with the downloadProgress choke, this is implemented by dropping signals that occur within 100ms of the previous emission. The 100% signal is always emitted (bytesSent == bytesTotal) When the upload size is initially unknown, this behaviour is still provided by the upload device emitting a suitable readProgress signal when EOF is reached. Task-number: QTBUG-20449 Change-Id: I77e03c8a49109106e1c375ee00380293fd326b63 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* choke downloadProgress signalsShane Kearns2012-06-141-3/+17
| | | | | | | | | | | | | | | | | | | The QNetworkReply::downloadProgress signal is intended for updating user interface components (e.g. a progress bar). Limit signal emissions to 10 times per second, with an additional signal just before the finished() signal to provide the 100% progress. For the size of download where a progress bar is necessary, this update frequency seems sufficient. The implementation is done by dropping signals which would be emitted less than 100ms after the previous signal emission. Task-number: QTBUG-20449 Change-Id: I9c2dbe16c70f3270cbf98f3c74cf9d9a3f0ab900 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* QNAM - maintain a weak reference to the QNetworkSessionShane Kearns2012-06-011-4/+4
| | | | | | | | | | | | | | | When handling signals from the session, a pointer is needed. Also the QNetworkReplyImpl needs to access the manager's session. So, the manager should have a strong and weak reference. The strong reference is held during connection establishment. The weak reference is held all the time, though it will become null when the session is destroyed in idle. The non static member function getNetworkSession() is used to create strong references from the weak reference where required. Task-number: ou1cimx#1004278 Change-Id: I4b5b36b1d996b98e659d993969006c61b4440c15 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Fix QtNetwork compilation for -qconfig largeTasuku Suzuki2012-05-191-0/+2
| | | | | Change-Id: I231272e59101e9492a7a1edbacab165b96927877 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Don't use obsolete qVariantValue, qVariantCanConvert, etc.Debao Zhang2012-05-021-2/+2
| | | | | | | | | | qVariantValue and qVariantCanConvert are Compatibility members, while in Qt4.8 they are marked as Qt 3 Support Members. qVariantFromValue and qVariantSetValue are Obsolete members. Change-Id: Ie8505cad1e0950e40c6f6710fde9f6fb2ac670fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Abort background requests if policy changes to disallow themShane Kearns2012-04-191-6/+21
| | | | | | | | | | | | | Using the policy change signal from QNetworkSession. If the new policy disallows background requests and this is a background request, then generate an error. This results in a TCP RST on the socket, and a BackgroundRequestNotAllowedError on the QNetworkReply. If the reply is already finished, no action is taken. Change-Id: I4ff5c681a8b7b852727bb95f03664d666f4efe07 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Connect usagePoliciesChanged signal to the QNetworkReplyShane Kearns2012-04-191-0/+7
| | | | | Change-Id: Ibb8ba0b3226e402dfa9a5a1a64faa80702b11dd7 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-04-171-8/+25
|\ | | | | | | Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
| * Check background requests are allowed before startingShane Kearns2012-04-111-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If background requests are not allowed, don't even attempt to start the network session, just fail the request immediately. After this change, a QNAM with mixed requests queued should behave as follows when background requests are disabled: - background requests at head of the queue fail - first foreground request starts the session and succeeds - remaining background requests fail - remaining foreground requests succeed If policy is changed on the fly, then running background requests are not aborted. However queued background requests won't be started. Change-Id: Ic9aba1eb59ca41b166a08d2ed09418e1b6af6b60 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
| * Use NetworkSessionFailedError in QNetworkReplyShane Kearns2012-04-111-3/+8
| | | | | | | | | | | | | | | | | | Switched the error code. Republish the error string from the bearer plugin if possible. Change-Id: I9e4ac7a9914fbf2e87fe8fd3a5175deda6d933d2 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
| * Set ConnectInBackground based on requestShane Kearns2012-04-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the QNetworkSession attribute to match the QNetworkRequest that triggered it. Currently if there are a mix of normal and background requests queued and background connections are not allowed by policy: - background requests at the head of the queue should fail - first foreground request should successfully start a connection - remaining requests succeed regardless of background attribute Change-Id: If0e3ec0b8a5096e3d7cd6df85884c6f53172d233 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
| * Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.Robin Burchell2012-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these functions just to avoid an include, except to pay for it with worse runtime performance. On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15% faster(!) than adding an additional call to qMemSet. The advantage on sizes above that is unmeasurable. For qMemCopy, the benefits are a little more modest: 16-7%. Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Responses to request with AlwaysNetwork set should be cachedMartin Petersson2012-04-161-4/+1
|/ | | | | | | | | | | Previously the cache was not enabled if the request had AlwaysNetwork set. This removes the check for the CacheLoadControlAttribute when checking if the cache should be enabled. Task-number: QTBUG-15805 Change-Id: I3d0722fbc1e6c77c5b947a2af0a09e2de8f4f9df Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Test for QT_NO_SSL instead of QT_NO_OPENSSLShane Kearns2012-02-211-3/+3
| | | | | | | | Change the ifdefs in our own code (except openssl backend) to use the new configure flag. Change-Id: I8774734771c66b22164b5fae8fdb27814ac3df7b Reviewed-by: Richard J. Moore <rich@kde.org>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | 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>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>