diff options
author | Glenn Watson <glenn.watson@nokia.com> | 2012-06-26 14:52:27 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-26 23:28:55 +0200 |
commit | fb5c74a07dac7deedb9ab3b8b4390941e5dd0762 (patch) | |
tree | 191f686acfa82176cda48207909b9643e11a36a7 /src/qml/qml/qquicklistmodel_p_p.h | |
parent | fe73fabad96f443247c6334b2c1b6ef59401c2c8 (diff) |
Support JS Date object in ListModel with static roles.
ListModel uses static roles by default for performance reasons. Add
JS Date object to list of supported types in this mode, via implicit
conversion to QDateTime.
Task-number: QTBUG-24456
Change-Id: Ifaa1a8d16290e87b61239ed351a949d66a02990c
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/qml/qml/qquicklistmodel_p_p.h')
-rw-r--r-- | src/qml/qml/qquicklistmodel_p_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/qml/qquicklistmodel_p_p.h b/src/qml/qml/qquicklistmodel_p_p.h index f9256c9f0a..a006721f9c 100644 --- a/src/qml/qml/qquicklistmodel_p_p.h +++ b/src/qml/qml/qquicklistmodel_p_p.h @@ -197,6 +197,7 @@ public: List, QObject, VariantMap, + DateTime, MaxDataType }; @@ -260,6 +261,7 @@ private: int setQObjectProperty(const ListLayout::Role &role, QObject *o); int setVariantMapProperty(const ListLayout::Role &role, v8::Handle<v8::Object> o, QV8Engine *eng); int setVariantMapProperty(const ListLayout::Role &role, QVariantMap *m); + int setDateTimeProperty(const ListLayout::Role &role, const QDateTime &dt); void setStringPropertyFast(const ListLayout::Role &role, const QString &s); void setDoublePropertyFast(const ListLayout::Role &role, double n); @@ -267,6 +269,7 @@ private: void setQObjectPropertyFast(const ListLayout::Role &role, QObject *o); void setListPropertyFast(const ListLayout::Role &role, ListModel *m); void setVariantMapFast(const ListLayout::Role &role, v8::Handle<v8::Object> o, QV8Engine *eng); + void setDateTimePropertyFast(const ListLayout::Role &role, const QDateTime &dt); void clearProperty(const ListLayout::Role &role); @@ -276,6 +279,7 @@ private: QObject *getQObjectProperty(const ListLayout::Role &role); QQmlGuard<QObject> *getGuardProperty(const ListLayout::Role &role); QVariantMap *getVariantMapProperty(const ListLayout::Role &role); + QDateTime *getDateTimeProperty(const ListLayout::Role &role); inline char *getPropertyMemory(const ListLayout::Role &role); |