Fix compatibility with Qt below version 5.5.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-11-14 15:06:22 +02:00
parent ae52f58f6f
commit bbee47fe35

View File

@ -101,8 +101,18 @@ QPointF GetOriginPoint(const QVector<quint32> objects, const VContainer *data, q
case GOType::SplinePath: case GOType::SplinePath:
case GOType::CubicBezier: case GOType::CubicBezier:
case GOType::CubicBezierPath: case GOType::CubicBezierPath:
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
originObjects.append(data->GeometricObject<VAbstractCurve>(id)->GetPoints()); originObjects.append(data->GeometricObject<VAbstractCurve>(id)->GetPoints());
#else
const QVector<QPointF> points = data->GeometricObject<VAbstractCurve>(id)->GetPoints();
foreach (const QPointF &point, points)
{
originObjects.append(point);
}
#endif // QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
break; break;
}
case GOType::Unknown: case GOType::Unknown:
case GOType::PlaceLabel: case GOType::PlaceLabel:
Q_UNREACHABLE(); Q_UNREACHABLE();