From 4d9d88af6ff494f09cfbc376a1f9aa0ea9ca2357 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 19 Jul 2012 14:33:28 +0200 Subject: Remove QWidgetStar. This allows us to remove the odd hacks to get the static metaobject for the QWidget* metatype. The QWidget* is still an automatic metatype thanks to the QObject partial template specialization. It is registered as a metatype at runtime automatically in qwidgetsvariant.cpp. Change-Id: Ie01b69eadf2cbe87af1a86c3284550f60dcf9e94 Reviewed-by: Olivier Goffart --- tests/auto/widgets/kernel/qwidgetsvariant/tst_qwidgetsvariant.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/auto/widgets/kernel/qwidgetsvariant') diff --git a/tests/auto/widgets/kernel/qwidgetsvariant/tst_qwidgetsvariant.cpp b/tests/auto/widgets/kernel/qwidgetsvariant/tst_qwidgetsvariant.cpp index 90238b5d9b..a5e33c41c9 100644 --- a/tests/auto/widgets/kernel/qwidgetsvariant/tst_qwidgetsvariant.cpp +++ b/tests/auto/widgets/kernel/qwidgetsvariant/tst_qwidgetsvariant.cpp @@ -198,11 +198,10 @@ void tst_QWidgetsVariant::qvariant_cast_QObject() QCOMPARE(data.userType(), int(QMetaType::QObjectStar)); QVERIFY(data.canConvert()); - QVERIFY(data.canConvert(QMetaType::QWidgetStar)); QVERIFY(data.canConvert(::qMetaTypeId())); QVERIFY(data.value()); - QVERIFY(data.convert(QMetaType::QWidgetStar)); - QCOMPARE(data.userType(), int(QMetaType::QWidgetStar)); + QVERIFY(data.convert(qMetaTypeId())); + QCOMPARE(data.userType(), qMetaTypeId()); } else { QVERIFY(!data.canConvert()); QVERIFY(!data.canConvert(QMetaType::QObjectStar)); @@ -219,7 +218,7 @@ void tst_QWidgetsVariant::qvariant_cast_QObject_derived() CustomQWidget customWidget; QWidget *widget = &customWidget; QVariant data = QVariant::fromValue(widget); - QVERIFY(data.userType() == QMetaType::QWidgetStar); + QVERIFY(data.userType() == qMetaTypeId()); QCOMPARE(data.value(), widget); QCOMPARE(data.value(), widget); -- cgit v1.2.3