summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-02-11 04:52:34 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-02-12 04:58:22 (GMT)
commit1d2b1b31166e029e009f08877ef95f95e58a03a4 (patch)
treeae2ce1a9465f885ff6e24b583fe7330c74a9dd78 /tests
parent4b740bdf8cbaaf97541a821c28bae075067343d3 (diff)
downloadQt-1d2b1b31166e029e009f08877ef95f95e58a03a4.zip
Qt-1d2b1b31166e029e009f08877ef95f95e58a03a4.tar.gz
Qt-1d2b1b31166e029e009f08877ef95f95e58a03a4.tar.bz2
Cleanup public QmlMetaType API
Remove some unnecessary methods from the QmlMetaType class
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp39
1 files changed, 24 insertions, 15 deletions
diff --git a/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp b/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp
index abc1fbe..ccb8f30 100644
--- a/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp
+++ b/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp
@@ -283,11 +283,14 @@ void tst_qmlmetatype::copy()
void tst_qmlmetatype::qmlParserStatusCast()
{
- QCOMPARE(QmlMetaType::qmlParserStatusCast(QVariant::Int), -1);
- QCOMPARE(QmlMetaType::qmlParserStatusCast(qMetaTypeId<TestType *>()), -1);
- QCOMPARE(QmlMetaType::qmlParserStatusCast(qMetaTypeId<ValueSourceTestType *>()), -1);
-
- int cast = QmlMetaType::qmlParserStatusCast(qMetaTypeId<ParserStatusTestType *>());
+ QVERIFY(QmlMetaType::qmlType(QVariant::Int) == 0);
+ QVERIFY(QmlMetaType::qmlType(qMetaTypeId<TestType *>()) != 0);
+ QCOMPARE(QmlMetaType::qmlType(qMetaTypeId<TestType *>())->parserStatusCast(), -1);
+ QVERIFY(QmlMetaType::qmlType(qMetaTypeId<ValueSourceTestType *>()) != 0);
+ QCOMPARE(QmlMetaType::qmlType(qMetaTypeId<ValueSourceTestType *>())->parserStatusCast(), -1);
+
+ QVERIFY(QmlMetaType::qmlType(qMetaTypeId<ParserStatusTestType *>()) != 0);
+ int cast = QmlMetaType::qmlType(qMetaTypeId<ParserStatusTestType *>())->parserStatusCast();
QVERIFY(cast != -1);
QVERIFY(cast != 0);
@@ -300,11 +303,14 @@ void tst_qmlmetatype::qmlParserStatusCast()
void tst_qmlmetatype::qmlPropertyValueSourceCast()
{
- QCOMPARE(QmlMetaType::qmlPropertyValueSourceCast(QVariant::Int), -1);
- QCOMPARE(QmlMetaType::qmlPropertyValueSourceCast(qMetaTypeId<TestType *>()), -1);
- QCOMPARE(QmlMetaType::qmlPropertyValueSourceCast(qMetaTypeId<ParserStatusTestType *>()), -1);
-
- int cast = QmlMetaType::qmlPropertyValueSourceCast(qMetaTypeId<ValueSourceTestType *>());
+ QVERIFY(QmlMetaType::qmlType(QVariant::Int) == 0);
+ QVERIFY(QmlMetaType::qmlType(qMetaTypeId<TestType *>()) != 0);
+ QCOMPARE(QmlMetaType::qmlType(qMetaTypeId<TestType *>())->propertyValueSourceCast(), -1);
+ QVERIFY(QmlMetaType::qmlType(qMetaTypeId<ParserStatusTestType *>()) != 0);
+ QCOMPARE(QmlMetaType::qmlType(qMetaTypeId<ParserStatusTestType *>())->propertyValueSourceCast(), -1);
+
+ QVERIFY(QmlMetaType::qmlType(qMetaTypeId<ValueSourceTestType *>()) != 0);
+ int cast = QmlMetaType::qmlType(qMetaTypeId<ValueSourceTestType *>())->propertyValueSourceCast();
QVERIFY(cast != -1);
QVERIFY(cast != 0);
@@ -317,11 +323,14 @@ void tst_qmlmetatype::qmlPropertyValueSourceCast()
void tst_qmlmetatype::qmlPropertyValueInterceptorCast()
{
- QCOMPARE(QmlMetaType::qmlPropertyValueInterceptorCast(QVariant::Int), -1);
- QCOMPARE(QmlMetaType::qmlPropertyValueInterceptorCast(qMetaTypeId<TestType *>()), -1);
- QCOMPARE(QmlMetaType::qmlPropertyValueInterceptorCast(qMetaTypeId<ParserStatusTestType *>()), -1);
-
- int cast = QmlMetaType::qmlPropertyValueInterceptorCast(qMetaTypeId<ValueInterceptorTestType *>());
+ QVERIFY(QmlMetaType::qmlType(QVariant::Int) == 0);
+ QVERIFY(QmlMetaType::qmlType(qMetaTypeId<TestType *>()) != 0);
+ QCOMPARE(QmlMetaType::qmlType(qMetaTypeId<TestType *>())->propertyValueInterceptorCast(), -1);
+ QVERIFY(QmlMetaType::qmlType(qMetaTypeId<ParserStatusTestType *>()) != 0);
+ QCOMPARE(QmlMetaType::qmlType(qMetaTypeId<ParserStatusTestType *>())->propertyValueInterceptorCast(), -1);
+
+ QVERIFY(QmlMetaType::qmlType(qMetaTypeId<ValueInterceptorTestType *>()) != 0);
+ int cast = QmlMetaType::qmlType(qMetaTypeId<ValueInterceptorTestType *>())->propertyValueInterceptorCast();
QVERIFY(cast != -1);
QVERIFY(cast != 0);