Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.2
-
None
-
4fc638c0b4562f4b1e9c9a367535e4b570602942
Description
Consider the following:
QTransformBug.cpp
#include <QTransform> #include <QDebug> int main(int argc, char *argv[]) { QTransform t1; t1.scale(10,10); qDebug() << "type 1: " << t1.type(); // Good. QTransform t2 = t1.inverted(); qDebug() << "type 2: " << t2.type(); // Good. QTransform t3 = t1.adjoint() / t1.determinant(); // This prints 0(TxNone), but I don't think that is // the right answer. Then all of the map() functions // treat the transform as the identity matrix. qDebug() << "type 3: " << t3.type(); // Bad. qDebug() << "(t2 == t3): " << (t2 == t3); return 0; }
using QTransform::inverted() should (and does) return the same transform matrix as (QTransform::adjoint() / QTransform.determinate()) yet the type flag is not set correctly when taking the inverse manually. This is erroneous behavior.