summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmldom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qmldom.cpp')
-rw-r--r--src/declarative/qml/qmldom.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp
index 38436b4..0ebbbfb 100644
--- a/src/declarative/qml/qmldom.cpp
+++ b/src/declarative/qml/qmldom.cpp
@@ -1415,6 +1415,30 @@ void QmlDomList::setValues(const QList<QmlDomValue> &values)
qWarning("QmlDomList::setValues(const QList<QmlDomValue> &): Not implemented");
}
+/*!
+ Returns the position in the input data where the list started, or 0 if
+ the property is invalid.
+*/
+int QmlDomList::position() const
+{
+ if (d && d->property) {
+ return d->property->listValueRange.offset;
+ } else
+ return 0;
+}
+
+/*!
+ Returns the length in the input data from where the list started upto
+ the end of it, or 0 if the property is invalid.
+*/
+int QmlDomList::length() const
+{
+ if (d && d->property)
+ return d->property->listValueRange.length;
+ else
+ return 0;
+}
+
/*!
\class QmlDomComponent