aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmllist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmllist.cpp')
-rw-r--r--src/qml/qml/qqmllist.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/qml/qml/qqmllist.cpp b/src/qml/qml/qqmllist.cpp
index 71be2e82a3..ac6e3695fe 100644
--- a/src/qml/qml/qqmllist.cpp
+++ b/src/qml/qml/qqmllist.cpp
@@ -55,7 +55,7 @@ QQmlListReference QQmlListReferencePrivate::init(const QQmlListProperty<QObject>
if (!prop.object) return rv;
- QQmlEnginePrivate *p = engine?QQmlEnginePrivate::get(engine):0;
+ QQmlEnginePrivate *p = engine?QQmlEnginePrivate::get(engine):nullptr;
int listType = p?p->listType(propType):QQmlMetaType::listType(propType);
if (listType == -1) return rv;
@@ -117,7 +117,7 @@ The \l {Qt Quick 1} version of this class is named QDeclarativeListReference.
Constructs an invalid instance.
*/
QQmlListReference::QQmlListReference()
-: d(0)
+: d(nullptr)
{
}
@@ -131,17 +131,17 @@ Passing \a engine is required to access some QML created list properties. If in
is available, pass it.
*/
QQmlListReference::QQmlListReference(QObject *object, const char *property, QQmlEngine *engine)
-: d(0)
+: d(nullptr)
{
if (!object || !property) return;
QQmlPropertyData local;
QQmlPropertyData *data =
- QQmlPropertyCache::property(engine, object, QLatin1String(property), 0, local);
+ QQmlPropertyCache::property(engine, object, QLatin1String(property), nullptr, local);
if (!data || !data->isQList()) return;
- QQmlEnginePrivate *p = engine?QQmlEnginePrivate::get(engine):0;
+ QQmlEnginePrivate *p = engine?QQmlEnginePrivate::get(engine):nullptr;
int listType = p?p->listType(data->propType()):QQmlMetaType::listType(data->propType());
if (listType == -1) return;
@@ -151,7 +151,7 @@ QQmlListReference::QQmlListReference(QObject *object, const char *property, QQml
d->elementType = p ? p->rawMetaObjectForType(listType) : QQmlMetaType::qmlType(listType).baseMetaObject();
d->propertyType = data->propType();
- void *args[] = { &d->property, 0 };
+ void *args[] = { &d->property, nullptr };
QMetaObject::metacall(object, QMetaObject::ReadProperty, data->coreIndex(), args);
}
@@ -191,7 +191,7 @@ Returns the list property's object. Returns 0 if the reference is invalid.
QObject *QQmlListReference::object() const
{
if (isValid()) return d->object;
- else return 0;
+ else return nullptr;
}
/*!
@@ -204,7 +204,7 @@ to a list.
const QMetaObject *QQmlListReference::listElementType() const
{
if (isValid()) return d->elementType.metaObject();
- else return 0;
+ else return nullptr;
}
/*!
@@ -301,7 +301,7 @@ Returns the list element at \a index, or 0 if the operation failed.
*/
QObject *QQmlListReference::at(int index) const
{
- if (!canAt()) return 0;
+ if (!canAt()) return nullptr;
return d->property.at(&d->property, index);
}
@@ -374,12 +374,12 @@ The \l {Qt Quick 1} version of this class is named QDeclarativeListProperty.
*/
/*!
-\fn QQmlListProperty::QQmlListProperty()
+\fn template<typename T> QQmlListProperty<T>::QQmlListProperty()
\internal
*/
/*!
-\fn QQmlListProperty::QQmlListProperty(QObject *object, QList<T *> &list)
+\fn template<typename T> QQmlListProperty<T>::QQmlListProperty(QObject *object, QList<T *> &list)
Convenience constructor for making a QQmlListProperty value from an existing
QList \a list. The \a list reference must remain valid for as long as \a object
@@ -391,7 +391,7 @@ can be very useful while prototyping.
*/
/*!
-\fn QQmlListProperty::QQmlListProperty(QObject *object, void *data,
+\fn template<typename T> QQmlListProperty<T>::QQmlListProperty(QObject *object, void *data,
CountFunction count, AtFunction at)
Construct a readonly QQmlListProperty from a set of operation functions
@@ -401,7 +401,7 @@ remains valid while \a object exists.
*/
/*!
-\fn QQmlListProperty::QQmlListProperty(QObject *object, void *data, AppendFunction append,
+\fn template<typename T> QQmlListProperty<T>::QQmlListProperty(QObject *object, void *data, AppendFunction append,
CountFunction count, AtFunction at,
ClearFunction clear)
@@ -432,7 +432,7 @@ Return the number of elements in the list \a property.
*/
/*!
-\fn bool QQmlListProperty::operator==(const QQmlListProperty &other) const
+\fn template<typename T> bool QQmlListProperty<T>::operator==(const QQmlListProperty &other) const
Returns true if this QQmlListProperty is equal to \a other, otherwise false.
*/