From 132a319dc782ef1feebe6582fb6f05dc91df74bb Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Fri, 7 Aug 2009 07:28:27 -0700 Subject: Fix compiler error on GCC 4.2.0 mips/sh3 Before this patch gcc would fail with this message: internal compiler error: in add_virtual_operand, at tree-ssa-operands.c:1317 Reviewed-by: Volker Hilsheimer --- src/gui/graphicsview/qgraphicsview.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index ca55f2e..92f8816 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -2209,8 +2209,7 @@ QPolygonF QGraphicsView::mapToScene(const QRect &rect) const QPointF br = scrollOffset + r.bottomRight(); QPointF bl = scrollOffset + r.bottomLeft(); - QPolygonF poly; - poly.resize(4); + QPolygonF poly(4); if (!d->identityMatrix) { QTransform x = d->matrix.inverted(); poly[0] = x.map(tl); @@ -2313,8 +2312,7 @@ QPolygon QGraphicsView::mapFromScene(const QRectF &rect) const br -= scrollOffset; bl -= scrollOffset; - QPolygon poly; - poly.resize(4); + QPolygon poly(4); poly[0] = tl.toPoint(); poly[1] = tr.toPoint(); poly[2] = br.toPoint(); @@ -3647,8 +3645,7 @@ QRectF QGraphicsViewPrivate::mapToScene(const QRectF &rect) const QPointF br = scrollOffset + rect.bottomRight(); QPointF bl = scrollOffset + rect.bottomLeft(); - QPolygonF poly; - poly.resize(4); + QPolygonF poly(4); if (!identityMatrix) { QTransform x = matrix.inverted(); poly[0] = x.map(tl); -- cgit v0.12