summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccesscache.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Network: Remove Q_DECL_METATYPE_EXTERN for single-.cpp metatypesThiago Macieira2023-05-131-3/+0
| | | | | | | | | | | | | | | These were added in commit 20e6a049fee48e876c8c6903101b58f918b5aab2 as a massive sweep of all Q_DECLARE_METATYPE, without thought as to whether they were actually needed or not. If they are used as a metatype in a single .cpp file, they don't need to be. Incidentally removes the entirely incorrect Q_NETWORK_EXPORT of QDnsLookupReply. Pick-to: 6.5 Change-Id: I3e3bfef633af4130a03afffd175e6f378f09a3aa Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtNetwork: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERN [2/2]: ↵Marc Mutz2022-04-061-0/+3
| | | | | | | | | | | | | | | private API It's one of our best tools to improve compile times. Can't backport to Qt 6.2 because the macros don't exist there. Pick-to: 6.3 Task-number: QTBUG-102206 Change-Id: Ic8f3870d8eec6211c4be506dc67717cc4e0ff7d6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtNetwork: Include moc filesMårten Nordheim2022-01-151-0/+2
| | | | | Change-Id: I227a9541bf76c1c048a694f022b8fc419c0c2544 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove QNetworkAccessCache::Node's explicit ctorMårten Nordheim2021-09-071-8/+4
| | | | | Change-Id: I2a993bcf96a0c603496e8a420251a7e01f46acee Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
* QNetworkAccessCache: Style fixes and move assertsMårten Nordheim2021-09-021-6/+4
| | | | | Change-Id: I300d2525d9987737697e2cc6a326be19554902c8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkAccessCache: Port to QDeadlineTimerMårten Nordheim2021-09-021-13/+11
| | | | | | | | | QDeadlineTimer is semantically more correct than comparing timestamps to 'now'. Change-Id: I15d9654af2886499392e6409d22f802203aca18d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkAccessCache: move debug logging to specific ifdefMårten Nordheim2021-09-021-1/+3
| | | | | | | | | | | | Instead of for any debug output. Since QTestLib cuts off output after X messages we shouldn't add these by default. Another option would be categorized logging, but QNAC should not be very interesting for 'outside' users Change-Id: I4c2c2a68ca4962476bfecd679f3229ccf3403aee Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkAccessCache: Remove the ctor and init member variables in classMårten Nordheim2021-09-021-5/+0
| | | | | | Change-Id: Ic7ce41679d89b496413ef13e6e917bf506b2405d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkAccessCache: Rename first and last nodeMårten Nordheim2021-09-021-62/+66
| | | | | | | | | | | | | 'oldest' and 'newest' to me make me thing of 'least recently inserted' and 'most recently inserted', which is what they used to mean. But now the expiration can be set per-request so the semantics don't work anymore. So, rename to 'nextExpiringNode' and 'lastExpiringNode'. Also rename the node member elements "older" and "newer" to the more generic "previous" and "next". Change-Id: I582267d09c60c68396e4201e4a20185bbf0942e2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkAccessCache: Another fix to the linked list insertionMårten Nordheim2021-08-311-0/+2
| | | | | | | | | When inserting between two nodes the "previous" node's "newer" was forgotten and not updated. So every node's "newer" would point to the "newest" node. Change-Id: I5b0df8812be5f7f62b3ae363e4c78f582e0e5c43 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkAccessCache: Remove unused codeMårten Nordheim2021-08-271-41/+0
| | | | | | | | The function was never called. As a consequence receiverQueue was only ever read and never written. Change-Id: I30905446452d9f263124d3af08c42e2e1b0cafbe Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix inserting node entry in QNetworkAccessCache::linkEntryJonas Kvinge2021-08-241-0/+1
| | | | | | | | | | When the new entry has the same, or older timestamp than the newest, it's linked behind the newest entry, but "newest" for the new node currently isn't assigned to the newer entry. Fixes: QTBUG-95950 Change-Id: I7ef5f1ce5a9479ce47839c8f1a6011124d3f43de Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNAM: Allow to configure when connections to a host are torn downMarkus Goetz2021-07-271-12/+47
| | | | | | | | | | | | This introduces a new attribute that allows behavior to keep the TCP connection(s) to a HTTP1/HTTP2 host longer or shorter than the default of 120 seconds. Note that the server might still close the connection earlier. Fixes: QTBUG-20726 Fixes: QTBUG-91440 Change-Id: I7da64230a78c642c12c0ddbe6b678cf17c3aafde Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix QNetworkAccessCache after QHash stability semantics changeLars Knoll2020-03-151-42/+41
| | | | | | | | The data structure relies on stable nodes in QHash, something that is not guaranteed in Qt 6 anymore. Change-Id: I9077ed404ee922893099f5eaae76d2dcea414090 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-11/+11
| | | | | | | | | | | 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>
* QNetworkAcesssCache: replace a QQueue with a std::vectorMarc Mutz2019-06-201-16/+16
| | | | | | | | | | | | | | | | | | | | The code didn't really use the queue as a queue, because it enqueued one at a time, but dequeued potentially many. Even if it actually decays to actual queue behavior: for the small number of elements expected, a vector would still be preferable over the per-element allocation performed by QQueue. Because std::vector doesn't have pop_front(), I took the liberty of making the dequeue code easier to read by using find_if with an aptly-named lambda. Change-Id: I09bd7ede50cb8ab5af5d1fc2ede37a3731f67070 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* 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>
* QNetworkAccessCache: convert QDateTime::currentDateTime() to ↵Marc Mutz2015-10-261-3/+3
| | | | | | | | | | | | | | | | | | currentDateTimeUtc() The latter is much faster as it doesn't have to deal with time zones. This change is safe, because the timestamp member is only ever handled inside, and the calculation of the time difference does not depend on any particular time zone. Credits to Milian Wolff, from whose QtWS15 talk this advice is taken. Change-Id: I6c9190a4253ce5972871ab1f12870f8ae9891966 Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+379
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12