summaryrefslogtreecommitdiffstats
path: root/src/svg
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-12-18 15:08:43 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-12-18 15:08:43 (GMT)
commit3e7ad7c2a42234ca6557ec76e65802ccc73e3184 (patch)
tree1eca5c2511afccb22fbe20058c27426b9f8ea79f /src/svg
parentc8e7e728f897cce45e9f94dbf16be6731f92e414 (diff)
parent4100b42403399e600e935d15d940c4ac6000816f (diff)
downloadQt-3e7ad7c2a42234ca6557ec76e65802ccc73e3184.zip
Qt-3e7ad7c2a42234ca6557ec76e65802ccc73e3184.tar.gz
Qt-3e7ad7c2a42234ca6557ec76e65802ccc73e3184.tar.bz2
Merge branch '4.5' into 4.6-staging
Diffstat (limited to 'src/svg')
-rw-r--r--src/svg/qsvghandler.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index ac220bd..21c947b 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;