diff options
| author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-29 04:47:53 (GMT) |
|---|---|---|
| committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-29 04:48:58 (GMT) |
| commit | d6817c59b664b1ce08e45bed902f17b58160a30f (patch) | |
| tree | 8a0c8736a0c26446756976f8dfd1212345ab847e /src/declarative/qml/qdeclarativescriptparser.cpp | |
| parent | e3ec89ed31439a83c10a2fc2d770283f4f10f31a (diff) | |
| download | Qt-d6817c59b664b1ce08e45bed902f17b58160a30f.zip Qt-d6817c59b664b1ce08e45bed902f17b58160a30f.tar.gz Qt-d6817c59b664b1ce08e45bed902f17b58160a30f.tar.bz2 | |
Use QDateTime when specifying a "date" property in QML
QT-718
Diffstat (limited to 'src/declarative/qml/qdeclarativescriptparser.cpp')
| -rw-r--r-- | src/declarative/qml/qdeclarativescriptparser.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp index 49bd3b7..ed35fed 100644 --- a/src/declarative/qml/qdeclarativescriptparser.cpp +++ b/src/declarative/qml/qdeclarativescriptparser.cpp @@ -528,7 +528,13 @@ bool ProcessAST::visit(AST::UiPublicMember *node) { "string", Object::DynamicProperty::String, "QString" }, { "url", Object::DynamicProperty::Url, "QUrl" }, { "color", Object::DynamicProperty::Color, "QColor" }, - { "date", Object::DynamicProperty::Date, "QDate" }, + // Internally QTime, QDate and QDateTime are all supported. + // To be more consistent with JavaScript we expose only + // QDateTime as it matches closely with the Date JS type. + // We also call it "date" to match. + // { "time", Object::DynamicProperty::Time, "QTime" }, + // { "date", Object::DynamicProperty::Date, "QDate" }, + { "date", Object::DynamicProperty::DateTime, "QDateTime" }, { "var", Object::DynamicProperty::Variant, "QVariant" }, { "variant", Object::DynamicProperty::Variant, "QVariant" } }; |
