aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickpath_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2019-08-16 11:18:38 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2019-09-02 22:23:03 +0200
commit811b15bd161d12e5c85e093f9f492a0c4fa278d6 (patch)
tree1efe0017f207b62d799711be410adc7f1db1bfb8 /src/quick/util/qquickpath_p.h
parent6dc319155a282cd274a93887c5b83c8ed8b82d90 (diff)
PathMultiline: allow lists/vectors of polygons or point lists/vectors
If a C++ model object can make a vector of vectors of points available directly, and it is bound to a PathMultiline's paths property to provide the view layer, it's a waste of time to convert it to a QVariantList of QVariantLists and back again. Changing the type of the property to QVariant instead of QVariantList enables an extensible set of supported types: all those that make sense. Fixes: QTBUG-77929 Change-Id: If749c2171173e7b9933fc9ecdf6d2741dc1c7500 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 e37a2e2dce..5987ae8f35 100644
--- a/src/quick/util/qquickpath_p.h
+++ b/src/quick/util/qquickpath_p.h
@@ -450,12 +450,12 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPathMultiline : public QQuickCurve
{
Q_OBJECT
Q_PROPERTY(QPointF start READ start NOTIFY startChanged)
- Q_PROPERTY(QVariantList paths READ paths WRITE setPaths NOTIFY pathsChanged)
+ Q_PROPERTY(QVariant paths READ paths WRITE setPaths NOTIFY pathsChanged)
public:
QQuickPathMultiline(QObject *parent=nullptr);
- QVariantList paths() const;
- void setPaths(const QVariantList &paths);
+ QVariant paths() const;
+ void setPaths(const QVariant &paths);
void setPaths(const QVector<QVector<QPointF>> &paths);
QPointF start() const;
void addToPath(QPainterPath &path, const QQuickPathData &) override;