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

QPixmap::loadFromData can cause internal QPixmapCache pollution if called on already loaded

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.4.0
    • 4.7.2
    • GUI: Painting
    • None
    • Windows and Mac and most likely Linux Qt effected
    • macOS

    Description

      If you create a QPixmap("filename.png") object, the contents of filename.png are added to the internal QPixmapCache of the QPixmap class. If later on in the same existence of that object, the loadFromData() function is used, the original "data" is not detach()'ed and the internal QPixmapCache copy is now polluted with whatever was loaded in manually.

      The documentation of detach() mentions that all write operations should automatically detach from the QPixmapCache, but in this case it isn't happening.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              rodal Samuel Rødal
              aronrosenberg Aron Rosenberg
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes