QNetworkAccessCache: Another fix to the linked list insertion
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>
This commit is contained in:
parent
586d9e6013
commit
5ad75eda0c
@ -173,6 +173,8 @@ void QNetworkAccessCache::linkEntry(const QByteArray &key)
|
|||||||
current = current->older;
|
current = current->older;
|
||||||
}
|
}
|
||||||
node->older = current->older;
|
node->older = current->older;
|
||||||
|
if (node->older)
|
||||||
|
node->older->newer = node;
|
||||||
node->newer = current;
|
node->newer = current;
|
||||||
current->older = node;
|
current->older = node;
|
||||||
if (node->older == nullptr) {
|
if (node->older == nullptr) {
|
||||||
|
Loading…
Reference in New Issue
Block a user