summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-03-29 04:57:29 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-03-29 04:57:29 (GMT)
commitd1f01956769f4f3ded29095afec5cbf52eb8f1c8 (patch)
treeaad0f023dd6e38541cf0f074f9e92483eaddaa98
parentd6817c59b664b1ce08e45bed902f17b58160a30f (diff)
downloadQt-d1f01956769f4f3ded29095afec5cbf52eb8f1c8.zip
Qt-d1f01956769f4f3ded29095afec5cbf52eb8f1c8.tar.gz
Qt-d1f01956769f4f3ded29095afec5cbf52eb8f1c8.tar.bz2
Remove "variant" QML properties
"property var a" works just as well
-rw-r--r--src/declarative/qml/qdeclarativescriptparser.cpp3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp1
3 files changed, 1 insertions, 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