[Development] QImage::transformed returns shallow copy for QTransform::TxNone matrix type.

Allan Sandfeld Jensen kde at carewolf.com
Mon Jul 11 16:47:08 CEST 2016


On Monday 11 July 2016, Benjamin TERRIER wrote:
> 2016-07-11 16:03 GMT+02:00 Paul Olav Tvete <paul.tvete at qt.io>:
> > On mandag 11. juli 2016 12.54.58 CEST Simon Hausmann wrote:
> >> Instead of using copy(), why not call the non-const bits() function (and
> >> don't use the returned value). That will detach [...]
> > 
> > Instead of using bits(), why not call detach() directly? ;)
> > 
> > - Paul
> > 
> > _______________________________________________
> > Development mailing list
> > Development at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/development
> 
> Hi,
> 
> QImage::detach() is not public API.
> However QPixmap::detach() is, so why QImage::detach() couldn't be made
> public too?
> 
It probably should be. It is a lot more sensible to use than copy(rect()).

BR
`Allan



More information about the Development mailing list