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

QPixmap doesn't call detach() when load() is being called

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.6.3
    • 4.6.2
    • Image formats
    • None
    • windows 7
    • 1ab5feb6260589f254ed209816cb67dbe9d3e4a5

    Description

      In 4.6.2, QPixmap break the implicit sharing rule. I dosen't call detach() when load() is being called. The following code can produce this problem.

      QPixmap pm1(":/image1.png");
      QPixmap pm2(pm1);

      pm1.load(":/image2.png");

      pm1.save("output1.png");
      pm2.save("output2.png");

      after running this program, output1.png should be the same as image2.png and output2.png should be the same as image1.png, but now they are both image2.png

      Attachments

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

        Activity

          People

            kjernase Trond Kjernåsen (Inactive)
            jianliang79 liang jian
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes