diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-12-18 16:08:43 +0100 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-12-18 16:08:43 +0100 |
commit | 3e7ad7c2a42234ca6557ec76e65802ccc73e3184 (patch) | |
tree | 1eca5c2511afccb22fbe20058c27426b9f8ea79f /src/svg | |
parent | c8e7e728f897cce45e9f94dbf16be6731f92e414 (diff) | |
parent | 4100b42403399e600e935d15d940c4ac6000816f (diff) | |
download | qt4-tools-3e7ad7c2a42234ca6557ec76e65802ccc73e3184.tar.gz |
Merge branch '4.5' into 4.6-staging
Diffstat (limited to 'src/svg')
-rw-r--r-- | src/svg/qsvghandler.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index ac220bd3b3..21c947b5be 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -2864,14 +2864,8 @@ static QSvgNode *createPolygonNode(QSvgNode *parent, const QChar *s = pointsStr.constData(); QVector<qreal> points = parseNumbersList(s); QPolygonF poly(points.count()/2); - int i = 0; - QVector<qreal>::const_iterator itr = points.constBegin(); - while (itr != points.constEnd()) { - qreal one = *itr; ++itr; - qreal two = *itr; ++itr; - poly[i] = QPointF(one, two); - ++i; - } + for (int i = 0; i < poly.size(); ++i) + poly[i] = QPointF(points.at(2 * i), points.at(2 * i + 1)); QSvgNode *polygon = new QSvgPolygon(parent, poly); return polygon; } @@ -2886,14 +2880,8 @@ static QSvgNode *createPolylineNode(QSvgNode *parent, const QChar *s = pointsStr.constData(); QVector<qreal> points = parseNumbersList(s); QPolygonF poly(points.count()/2); - int i = 0; - QVector<qreal>::const_iterator itr = points.constBegin(); - while (itr != points.constEnd()) { - qreal one = *itr; ++itr; - qreal two = *itr; ++itr; - poly[i] = QPointF(one, two); - ++i; - } + for (int i = 0; i < poly.size(); ++i) + poly[i] = QPointF(points.at(2 * i), points.at(2 * i + 1)); QSvgNode *line = new QSvgPolyline(parent, poly); return line; |