[Development] QImage::transformed returns shallow copy for QTransform::TxNone matrix type.
Simon.Hausmann at qt.io
Mon Jul 11 11:59:34 CEST 2016
Could you elaborate on what you see as the discrepancy between docs and implementation? The docs don't say whether
it's a shallow or a deep copy, so it looks to me that the implementation is within the bounds of the docs.
Plus it seems sensible to return a shallow copy, doesn't it?
From: Development <development-bounces+simon.hausmann=qt.io at qt-project.org> on behalf of Tomasz Olszak <olszak.tomasz at gmail.com>
Sent: Monday, July 11, 2016 11:38:06 AM
To: development at qt-project.org
Subject: [Development] QImage::transformed returns shallow copy for QTransform::TxNone matrix type.
QImage:: transformed(const QTransform &matrix, Qt::TransformationMode mode = Qt::FastTransformation) docs:
"Returns a copy of the image that is transformed using the given transformation matrix and transformation mode."
But if matrix.type() == QTransform::TxNone then shallow instead of deep copy is returned.
I'm happy to submit a fix but I don't know what is expected behaviour? Should implementation follow docs or docs or docs follow implementation here?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development