diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-30 00:10:01 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-30 00:10:01 (GMT) |
commit | b05a072e389359dd7a7603d0b59049b87c76d4e6 (patch) | |
tree | c843965c976e00a031bf5df00c0a36bcdc0feb23 | |
parent | ca3f5521e1d3ada541739d6013d8c6fb795244a9 (diff) | |
download | Qt-b05a072e389359dd7a7603d0b59049b87c76d4e6.zip Qt-b05a072e389359dd7a7603d0b59049b87c76d4e6.tar.gz Qt-b05a072e389359dd7a7603d0b59049b87c76d4e6.tar.bz2 |
Fix qdeclarativedom::loadDynamicProperty test
-rw-r--r-- | src/declarative/qml/qdeclarativedom.cpp | 6 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp | 10 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/declarative/qml/qdeclarativedom.cpp b/src/declarative/qml/qdeclarativedom.cpp index 366750e..dec30a1 100644 --- a/src/declarative/qml/qdeclarativedom.cpp +++ b/src/declarative/qml/qdeclarativedom.cpp @@ -480,9 +480,15 @@ int QDeclarativeDomDynamicProperty::propertyType() const case QDeclarativeParser::Object::DynamicProperty::Color: return QMetaType::type("QColor"); + case QDeclarativeParser::Object::DynamicProperty::Time: + return QMetaType::type("QTime"); + case QDeclarativeParser::Object::DynamicProperty::Date: return QMetaType::type("QDate"); + case QDeclarativeParser::Object::DynamicProperty::DateTime: + return QMetaType::type("QDateTime"); + case QDeclarativeParser::Object::DynamicProperty::Int: return QMetaType::type("int"); diff --git a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp index 16efba9..79b0c36 100644 --- a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp +++ b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp @@ -451,8 +451,7 @@ void tst_qdeclarativedom::loadDynamicProperty() " property color g\n" " property date h\n" " property var i\n" - " property variant j\n" - " property QtObject k\n" + " property QtObject j\n" "}"; QDeclarativeDomDocument document; @@ -461,7 +460,7 @@ void tst_qdeclarativedom::loadDynamicProperty() QDeclarativeDomObject rootObject = document.rootObject(); QVERIFY(rootObject.isValid()); - QCOMPARE(rootObject.dynamicProperties().count(), 11); + QCOMPARE(rootObject.dynamicProperties().count(), 10); #define DP_TEST(index, name, type, test_position, test_length, propTypeName) \ { \ @@ -483,10 +482,9 @@ void tst_qdeclarativedom::loadDynamicProperty() DP_TEST(4, e, QVariant::String, 106, 17, "string"); DP_TEST(5, f, QVariant::Url, 128, 14, "url"); DP_TEST(6, g, QVariant::Color, 147, 16, "color"); - DP_TEST(7, h, QVariant::Date, 168, 15, "date"); + DP_TEST(7, h, QVariant::DateTime, 168, 15, "date"); DP_TEST(8, i, qMetaTypeId<QVariant>(), 188, 14, "var"); - DP_TEST(9, j, qMetaTypeId<QVariant>(), 207, 18, "variant"); - DP_TEST(10, k, -1, 230, 19, "QtObject"); + DP_TEST(9, j, -1, 207, 19, "QtObject"); } { |