From a6dd968379935452462b5785e937c37b3561425f Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 13 Nov 2020 10:37:09 +0100 Subject: shiboken6: Use std::optional for returning AbstractMetaType Remove its invalid state. Remove a few checks that apparently originated from the old code where AbstractMetaType * = 0 meant void. Change-Id: Ifc938c011f07f4b5316f708f6cce1e98bcaa8125 Reviewed-by: Christian Tismer --- sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp') diff --git a/sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp b/sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp index 0fab1bf07..e65b0f214 100644 --- a/sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp +++ b/sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp @@ -77,7 +77,7 @@ void TestAbstractMetaType::testConstCharPtrType() AbstractMetaFunction *func = builder->globalFunctions().constFirst(); AbstractMetaType rtype = func->type(); // Test properties of const char* - QVERIFY(rtype); + QVERIFY(!rtype.isVoid()); QCOMPARE(rtype.package(), QLatin1String("Foo")); QCOMPARE(rtype.name(), QLatin1String("char")); QVERIFY(rtype.isConstant()); @@ -150,7 +150,7 @@ void TestAbstractMetaType::testCharType() AbstractMetaFunction *func = functions.constFirst(); AbstractMetaType rtype = func->type(); // Test properties of const char* - QVERIFY(rtype); + QVERIFY(!rtype.isVoid()); QCOMPARE(rtype.package(), QLatin1String("Foo")); QCOMPARE(rtype.name(), QLatin1String("char")); QVERIFY(!rtype.isConstant()); -- cgit v1.2.3