aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickpath_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2019-08-16 05:51:02 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2019-09-02 22:22:35 +0200
commit6dc319155a282cd274a93887c5b83c8ed8b82d90 (patch)
treeb7dc01ee5385be81674817e5bef2975876dacf2c /src/quick/util/qquickpath_p.h
parent426f3035a3753800ce340a83bdf8db13922f4cae (diff)
Enable PathPolyline to take a QPolygonF or QVector<QPointF> path
If a C++ model object can make a vector of points available directly, and it is bound to a PathPolyline's path to provide the view layer, it's a waste of time to convert it to a QVariantList and back again. Changing the type of the property to QVariant instead of QVariantList enables an extensible set of supported types. Task-number: QTBUG-77929 Change-Id: I2453b59e047ec3310070e943f6934c9ddcd1ffaa Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src/quick/util/qquickpath_p.h')
-rw-r--r--src/quick/util/qquickpath_p.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/util/qquickpath_p.h b/src/quick/util/qquickpath_p.h
index 92607a6c1e..e37a2e2dce 100644
--- a/src/quick/util/qquickpath_p.h
+++ b/src/quick/util/qquickpath_p.h
@@ -428,12 +428,12 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPathPolyline : public QQuickCurve
{
Q_OBJECT
Q_PROPERTY(QPointF start READ start NOTIFY startChanged)
- Q_PROPERTY(QVariantList path READ path WRITE setPath NOTIFY pathChanged)
+ Q_PROPERTY(QVariant path READ path WRITE setPath NOTIFY pathChanged)
public:
QQuickPathPolyline(QObject *parent=nullptr);
- QVariantList path() const;
- void setPath(const QVariantList &path);
+ QVariant path() const;
+ void setPath(const QVariant &path);
void setPath(const QVector<QPointF> &path);
QPointF start() const;
void addToPath(QPainterPath &path, const QQuickPathData &data) override;