Fix typo in qbezier shift implementation
authorKent Hansen <kent.hansen@nokia.com>
Wed, 5 Oct 2011 10:04:34 +0000 (12:04 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 6 Oct 2011 07:36:39 +0000 (09:36 +0200)
Multiplying by zero was not the intention.

Task-number: QTBUG-20482
Change-Id: I3c4dfd69da4d98ed65f318d1fa0c3cf827017688
Reviewed-on: http://codereview.qt-project.org/6048
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
src/gui/painting/qbezier.cpp

index 05c1f6e..9d204f9 100644 (file)
@@ -319,7 +319,7 @@ static ShiftResult shift(const QBezier *orig, QBezier *shifted, qreal offset, qr
     QRectF b = orig->bounds();
     if (np == 4 && b.width() < .1*offset && b.height() < .1*offset) {
         qreal l = (orig->x1 - orig->x2)*(orig->x1 - orig->x2) +
-                  (orig->y1 - orig->y2)*(orig->y1 - orig->y1) *
+                  (orig->y1 - orig->y2)*(orig->y1 - orig->y2) *
                   (orig->x3 - orig->x4)*(orig->x3 - orig->x4) +
                   (orig->y3 - orig->y4)*(orig->y3 - orig->y4);
         qreal dot = (orig->x1 - orig->x2)*(orig->x3 - orig->x4) +