summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-02-09 05:09:42 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-02-09 05:42:41 (GMT)
commitd914555badcd4761864657e1e335e657b791453f (patch)
treee2038d1adea4efada31c4732cd36a71fbec2fbb7 /src/declarative/graphicsitems
parent2f653cc06b97b443b9832d0121dbf92b35dd32c2 (diff)
downloadQt-d914555badcd4761864657e1e335e657b791453f.zip
Qt-d914555badcd4761864657e1e335e657b791453f.tar.gz
Qt-d914555badcd4761864657e1e335e657b791453f.tar.bz2
Replace QList<>* support with QmlListProperty
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem.cpp6
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspath.cpp4
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspath_p.h4
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrectangle_p.h4
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp4
5 files changed, 11 insertions, 11 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
index 8973cb4..ed5b18f 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
@@ -1000,7 +1000,7 @@ class QmlGraphicsKeysAttached : public QObject, public QmlGraphicsItemKeyFilter
Q_DECLARE_PRIVATE(QmlGraphicsKeysAttached)
Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
- Q_PROPERTY(QList<QmlGraphicsItem *> *forwardTo READ forwardTo)
+ Q_PROPERTY(QmlListProperty<QmlGraphicsItem> forwardTo READ forwardTo)
public:
QmlGraphicsKeysAttached(QObject *parent=0);
@@ -1015,9 +1015,9 @@ public:
}
}
- QList<QmlGraphicsItem *> *forwardTo() {
+ QmlListProperty<QmlGraphicsItem> forwardTo() {
Q_D(QmlGraphicsKeysAttached);
- return &d->targets;
+ return QmlListProperty<QmlGraphicsItem>(this, d->targets);
}
virtual void componentComplete();
diff --git a/src/declarative/graphicsitems/qmlgraphicspath.cpp b/src/declarative/graphicsitems/qmlgraphicspath.cpp
index 18f27af..2bac4b6 100644
--- a/src/declarative/graphicsitems/qmlgraphicspath.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspath.cpp
@@ -163,10 +163,10 @@ bool QmlGraphicsPath::isClosed() const
\snippet doc/src/snippets/declarative/pathview/pathattributes.qml 2
*/
-QList<QmlGraphicsPathElement *>* QmlGraphicsPath::pathElements()
+QmlListProperty<QmlGraphicsPathElement> QmlGraphicsPath::pathElements()
{
Q_D(QmlGraphicsPath);
- return &(d->_pathElements);
+ return QmlListProperty<QmlGraphicsPathElement>(this, d->_pathElements);
}
void QmlGraphicsPath::interpolate(int idx, const QString &name, qreal value)
diff --git a/src/declarative/graphicsitems/qmlgraphicspath_p.h b/src/declarative/graphicsitems/qmlgraphicspath_p.h
index 2b4b0fd..50ea15b 100644
--- a/src/declarative/graphicsitems/qmlgraphicspath_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicspath_p.h
@@ -189,7 +189,7 @@ class Q_DECLARATIVE_EXPORT QmlGraphicsPath : public QObject, public QmlParserSta
Q_OBJECT
Q_INTERFACES(QmlParserStatus)
- Q_PROPERTY(QList<QmlGraphicsPathElement *>* pathElements READ pathElements)
+ Q_PROPERTY(QmlListProperty<QmlGraphicsPathElement> pathElements READ pathElements)
Q_PROPERTY(qreal startX READ startX WRITE setStartX)
Q_PROPERTY(qreal startY READ startY WRITE setStartY)
Q_PROPERTY(bool closed READ isClosed NOTIFY changed)
@@ -199,7 +199,7 @@ public:
QmlGraphicsPath(QObject *parent=0);
~QmlGraphicsPath();
- QList<QmlGraphicsPathElement *>* pathElements();
+ QmlListProperty<QmlGraphicsPathElement> pathElements();
qreal startX() const;
void setStartX(qreal x);
diff --git a/src/declarative/graphicsitems/qmlgraphicsrectangle_p.h b/src/declarative/graphicsitems/qmlgraphicsrectangle_p.h
index 4f4c1cf..b8c2179 100644
--- a/src/declarative/graphicsitems/qmlgraphicsrectangle_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsrectangle_p.h
@@ -107,14 +107,14 @@ class Q_DECLARATIVE_EXPORT QmlGraphicsGradient : public QObject
{
Q_OBJECT
- Q_PROPERTY(QList<QmlGraphicsGradientStop *> *stops READ stops)
+ Q_PROPERTY(QmlListProperty<QmlGraphicsGradientStop> stops READ stops)
Q_CLASSINFO("DefaultProperty", "stops")
public:
QmlGraphicsGradient(QObject *parent=0) : QObject(parent), m_gradient(0) {}
~QmlGraphicsGradient() { delete m_gradient; }
- QList<QmlGraphicsGradientStop *> *stops() { return &m_stops; }
+ QmlListProperty<QmlGraphicsGradientStop> stops() { return QmlListProperty<QmlGraphicsGradientStop>(this, m_stops); }
const QGradient *gradient() const;
diff --git a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp
index 2fc143d..4f5b53c 100644
--- a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp
@@ -463,7 +463,7 @@ int QmlGraphicsVisualDataModelDataMetaObject::createProperty(const char *name, c
if ((!model->m_listModelInterface || !model->m_abstractItemModel) && model->m_listAccessor) {
if (model->m_listAccessor->type() == QmlListAccessor::QmlList
- || model->m_listAccessor->type() == QmlListAccessor::QListPtr) {
+ || model->m_listAccessor->type() == QmlListAccessor::ListProperty) {
model->ensureRoles();
QObject *object = model->m_listAccessor->at(data->m_index).value<QObject*>();
if (object && object->property(name).isValid())
@@ -725,7 +725,7 @@ void QmlGraphicsVisualDataModel::setModel(const QVariant &model)
}
d->m_listAccessor = new QmlListAccessor;
d->m_listAccessor->setList(model, d->m_context?d->m_context->engine():qmlEngine(this));
- if (d->m_listAccessor->type() != QmlListAccessor::QmlList && d->m_listAccessor->type() != QmlListAccessor::QListPtr)
+ if (d->m_listAccessor->type() != QmlListAccessor::QmlList && d->m_listAccessor->type() != QmlListAccessor::ListProperty)
d->m_metaDataCacheable = true;
if (d->m_delegate && d->modelCount()) {
emit itemsInserted(0, d->modelCount());