Fix GCC 6 warnings, thanks Remi Collet

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4442 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2016-04-16 17:45:56 +00:00
parent f7f75be332
commit b6886defbd
2 changed files with 26 additions and 11 deletions

View File

@@ -220,13 +220,25 @@ QPainterPath QetShapeItem::shape() const
switch (m_shapeType)
{
case Line: path.moveTo(m_P1);
path.lineTo(m_P2); break;
case Rectangle: path.addRect(QRectF(m_P1, m_P2)); break;
case Ellipse: path.addEllipse(QRectF(m_P1, m_P2)); break;
case Polygon: path.addPolygon(m_polygon);
if (m_close) path.closeSubpath(); break;
default: Q_ASSERT(false); break;
case Line:
path.moveTo(m_P1);
path.lineTo(m_P2);
break;
case Rectangle:
path.addRect(QRectF(m_P1, m_P2));
break;
case Ellipse:
path.addEllipse(QRectF(m_P1, m_P2));
break;
case Polygon:
path.addPolygon(m_polygon);
if (m_close) {
path.closeSubpath();
}
break;
default:
Q_ASSERT(false);
break;
}
QPainterPathStroker pps;