From d1f01956769f4f3ded29095afec5cbf52eb8f1c8 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Mon, 29 Mar 2010 14:57:29 +1000 Subject: Remove "variant" QML properties "property var a" works just as well --- src/declarative/qml/qdeclarativescriptparser.cpp | 3 +-- tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml | 1 - .../auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp index ed35fed..9fff294 100644 --- a/src/declarative/qml/qdeclarativescriptparser.cpp +++ b/src/declarative/qml/qdeclarativescriptparser.cpp @@ -535,8 +535,7 @@ bool ProcessAST::visit(AST::UiPublicMember *node) // { "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" } + { "var", Object::DynamicProperty::Variant, "QVariant" } }; const int propTypeNameToTypesCount = sizeof(propTypeNameToTypes) / sizeof(propTypeNameToTypes[0]); diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml index aef3269..bedab8c 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml @@ -10,5 +10,4 @@ QtObject { property url urlProperty: "main.qml" property date dateProperty: "1945-09-02" property var varProperty: "Hello World!" - property variant variantProperty: 12 } diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index eae78c4..e2cf5ca 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -586,7 +586,6 @@ void tst_qdeclarativelanguage::dynamicProperties() QCOMPARE(object->property("colorProperty"), QVariant(QColor("red"))); QCOMPARE(object->property("dateProperty"), QVariant(QDate(1945, 9, 2))); QCOMPARE(object->property("varProperty"), QVariant("Hello World!")); - QCOMPARE(object->property("variantProperty"), QVariant(12)); } // Test that nested types can use dynamic properties -- cgit v0.12