summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccesscache.cpp
diff options
context:
space:
mode:
authorJonas Kvinge <jonas@jkvinge.net>2021-08-22 03:07:21 +0200
committerJonas Kvinge <jonas@jkvinge.net>2021-08-24 16:40:57 +0200
commit41b56c31bc1ef5bead6a718f4080a61dcbd04686 (patch)
treec164be2d0d61b770be39f43cc5f77103cdb0a689 /src/network/access/qnetworkaccesscache.cpp
parent3c1125d9fe41332087ab6213a5514426109ead08 (diff)
Fix inserting node entry in QNetworkAccessCache::linkEntry
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>
Diffstat (limited to 'src/network/access/qnetworkaccesscache.cpp')
-rw-r--r--src/network/access/qnetworkaccesscache.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/access/qnetworkaccesscache.cpp b/src/network/access/qnetworkaccesscache.cpp
index 7c8da551ad..865dcab6c8 100644
--- a/src/network/access/qnetworkaccesscache.cpp
+++ b/src/network/access/qnetworkaccesscache.cpp
@@ -174,6 +174,7 @@ void QNetworkAccessCache::linkEntry(const QByteArray &key)
current = current->older;
}
node->older = current->older;
+ node->newer = current;
current->older = node;
if (node->older == nullptr) {
oldest = node;