Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.6.2
-
None
-
ce0af99f47c1728a6d8145ea89f41b1c9207104a
Description
While fixing QTBUG-4887, I noticed what appears to be an unnecessary call to detach() in QImage::setAlphaChannel. It happens just before an assignment to *this with only a call to convertToFormat in between. I think the call to convertToFormat has no effect on this, and the assignment to *this will itself deref any shared copy, so the detach call could just create an unnecessary copy of the existing image, which would take quite a long time.