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

QPixmapCache removes pixmaps while there's plenty of cache left

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P4: Low
    • Resolution: Unresolved
    • Affects Version/s: 4.8.4
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      kubuntu 13.04 32bit

      Description

      There's a timer in QPixmapCache QPMCache::timerEvent() that is called every 30 seconds and for some reason even with more than 50% of the cache empty it removes my pixmap from the cache.
      Documentation says pixmaps will be removed when running out of space:
      "When a pixmap is inserted and the cache is about to exceed its limit, it removes pixmaps until there is enough room for the pixmap to be inserted.
      The oldest pixmaps (least recently accessed in the cache) are deleted when more space is needed." but not spontaneously ? I was going to use it later...
      I've attached a unittest demonstrating the issue

        Attachments

        1. unittest.cpp
          1 kB
        2. unittesttt2.cpp
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              sletta Gunnar Sletta
              Reporter:
              tomdemanaalst Tom De Man
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes