Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-95009

QNetworkDiskCache::cacheSize() returns a size twice as large as the real one.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.1.3, 6.2.0 Beta2, 6.3.0 Alpha
    • 5.15.1, 5.15.2
    • Network: Cache
    • None
    • Ubuntu 20.04: Reproduced
      Windows 10: Reproduced on msys2
      MacOs: not tested.

      Package: QtCore, QtNetwork
    • Linux/X11, Windows
    • 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

        Activity

          People

            manordheim Mårten Nordheim
            benjamind Benjamin Délèze
            Vladimir Minenko Vladimir Minenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes