diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-05-20 19:45:38 +0200 |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-05-20 19:46:19 +0200 |
commit | d671acd5b296b83440db9836a92189c501c87ff3 (patch) | |
tree | bd9c1a000e17c70124c207666cfb3276b5518ffd /tests/auto/qtessellator/oldtessellator.cpp | |
parent | 42f5786104f9eef9542df2c7469a03324978281d (diff) | |
parent | 4f2138ecfbdc58e5cb5b0c7d762197ef69752957 (diff) |
Merge remote branch 'staging/master' into refactor
Conflicts:
src/opengl/qgl_qpa.cpp
src/plugins/platforms/glxconvenience/qglxconvenience.cpp
src/plugins/platforms/platforms.pro
src/plugins/platforms/wayland/qwaylandwindow.cpp
src/plugins/platforms/xcb/qxcbwindow.cpp
src/plugins/platforms/xcb/qxcbwindow.h
src/plugins/platforms/xcb/qxcbwindowsurface.cpp
src/widgets/kernel/qwidget_qpa.cpp
tests/auto/qvariant/tst_qvariant.cpp
Diffstat (limited to 'tests/auto/qtessellator/oldtessellator.cpp')
-rw-r--r-- | tests/auto/qtessellator/oldtessellator.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/tests/auto/qtessellator/oldtessellator.cpp b/tests/auto/qtessellator/oldtessellator.cpp index 78f117f3e3..bc24d7e69e 100644 --- a/tests/auto/qtessellator/oldtessellator.cpp +++ b/tests/auto/qtessellator/oldtessellator.cpp @@ -80,19 +80,6 @@ struct QEdge { horizontal = p1.y == p2.y; } - inline qreal xAt(const qreal &y) const - { - Q_ASSERT(p1.y != p2.y); - XFixed yf = XDoubleToFixed(y); - - if (yf == p1.y) - return XFixedToDouble(p1.x); - else if (yf == p2.y) - return XFixedToDouble(p2.x); - - return (!vertical) ? (((y - b)*im)) : pf1.x(); - } - QPointF pf1, pf2; XPointFixed p1, p2; qreal m; @@ -218,7 +205,8 @@ void old_tesselate_polygon(QVector<XTrapezoid> *traps, const QPointF *pg, int pg qreal ymax(INT_MIN/256); //painter.begin(pg, pgSize); - Q_ASSERT(pg[0] == pg[pgSize-1]); + if (pg[0] != pg[pgSize-1]) + qWarning() << Q_FUNC_INFO << "Malformed polygon (first and last points must be identical)"; // generate edge table // qDebug() << "POINTS:"; for (int x = 0; x < pgSize-1; ++x) { @@ -383,7 +371,8 @@ void old_tesselate_polygon(QVector<XTrapezoid> *traps, const QPointF *pg, int pg isects[i].edge = edge; } - Q_ASSERT(isects.size()%2 == 1); + if (isects.size()%2 != 1) + qFatal("%s: number of intersection points must be odd", Q_FUNC_INFO); // sort intersection points qSort(&isects[0], &isects[isects.size()-1], compareIntersections); |