summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-11 23:19:05 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-11 23:19:05 (GMT)
commitbe016a25fbd41f9c546ea4b0468040a2aac50a35 (patch)
tree5eb7503ae2cf1f53afd40894f13686bc6c304382
parent75d33c70eb040b56d1dfe6c9f96cc9cbf025d83f (diff)
parent276ab224a9bfcf77814e59fe36e4dd05c3723d99 (diff)
downloadQt-be016a25fbd41f9c546ea4b0468040a2aac50a35.zip
Qt-be016a25fbd41f9c546ea4b0468040a2aac50a35.tar.gz
Qt-be016a25fbd41f9c546ea4b0468040a2aac50a35.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixed bug in QTransform::type() after using operator/ or operator*.
-rw-r--r--src/gui/painting/qtransform.h7
-rw-r--r--tests/auto/qtransform/tst_qtransform.cpp5
2 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index 9909643..212a582 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -293,7 +293,8 @@ inline QTransform &QTransform::operator*=(qreal num)
affine._dx *= num;
affine._dy *= num;
m_33 *= num;
- m_dirty |= TxScale;
+ if (m_dirty < TxScale)
+ m_dirty = TxScale;
return *this;
}
inline QTransform &QTransform::operator/=(qreal div)
@@ -316,7 +317,7 @@ inline QTransform &QTransform::operator+=(qreal num)
affine._dx += num;
affine._dy += num;
m_33 += num;
- m_dirty |= TxProject;
+ m_dirty = TxProject;
return *this;
}
inline QTransform &QTransform::operator-=(qreal num)
@@ -332,7 +333,7 @@ inline QTransform &QTransform::operator-=(qreal num)
affine._dx -= num;
affine._dy -= num;
m_33 -= num;
- m_dirty |= TxProject;
+ m_dirty = TxProject;
return *this;
}
diff --git a/tests/auto/qtransform/tst_qtransform.cpp b/tests/auto/qtransform/tst_qtransform.cpp
index 827a486..a3ded8e 100644
--- a/tests/auto/qtransform/tst_qtransform.cpp
+++ b/tests/auto/qtransform/tst_qtransform.cpp
@@ -610,6 +610,11 @@ void tst_QTransform::types()
m4.rotate(45);
QCOMPARE(m4.type(), QTransform::TxRotate);
+
+ QTransform m5;
+ m5.scale(5, 5);
+ m5 = m5.adjoint() / m5.determinant();
+ QCOMPARE(m5.type(), QTransform::TxScale);
}