Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15.1, 5.15.2
-
None
-
Ubuntu 20.04: Reproduced
Windows 10: Reproduced on msys2
MacOs: not tested.
Package: QtCore, QtNetwork
-
-
5
-
d9f80502f6450f0bc8e6d7ca13e1c912ad485599 (qt/qtbase/dev) d31118fa0ee09ffe90332c7d6554bd0b347cbb1e (qt/qtbase/6.1) d550409457c46698753e663d4cb37a83b3a0387e (qt/qtbase/6.2) a2d5ff0b3007e3ff901a6396bec69186ff3b96ab (qt/tqtc-qtbase/5.15)
-
Qt6_Foundation_Sprint 38
Description
Hello,
Context
I am using a QNetworkDiskCache with a QNetworkAccessManager in webots to download resources (mainly images).
Bug
- A QNetworkAccessManager that have a QNetworkDiskCache of maximum size of 1GB at the location defined by QStandardPaths + "/network".
- The QNetworkAccessManager download an image with its get() method, let's say the image's size is 4MB.
- Check the size of the cache on the disk: a bit more than 4MB
- Call the cacheSize() method of the QNetworkDiskCache. It returns a bit more than 8MB.
- Close the program
- Launch it again
- Call the cacheSize() method of the QNetworkDiskCache. It returns a bit more than 4MB.
- Check the size of the cache on the disk: a bit more than 4MB
Bug: the first time we call cacheSize it returns a size twice as large as the real one. But once we close everything and reload the cache, cacheSize returns the good size.
Attachments
For Gerrit Dashboard: QTBUG-95009 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
360433,3 | QNetworkDiskCache: Fix tracking of size during storeItem() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
360968,2 | QNetworkDiskCache: Fix tracking of size during storeItem() | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
360969,2 | QNetworkDiskCache: Fix tracking of size during storeItem() | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
360972,2 | QNetworkDiskCache: Fix tracking of size during storeItem() | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |