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::CubicBezier:
case GOType::CubicBezierPath:
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
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;
}
case GOType::Unknown:
case GOType::PlaceLabel:
Q_UNREACHABLE();