aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/tests/testimplicitconversions.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-22 08:59:03 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-27 10:01:34 +0000
commit8b88410f9f9589235738bb26739d40af4447cc05 (patch)
tree19276bec219bf2a3c728fdced77b8fb3a45063fc /sources/shiboken2/ApiExtractor/tests/testimplicitconversions.cpp
parent49bd2b28d4a666107d4d124b9a5cc9fbe88d8fe8 (diff)
shiboken2: AbstractMetaArgument: use QSharedData[Pointer]
Similar to AbstractMetaType, AbstractMetaArgument was previously kept as a raw pointer. The data were copied numerous times by AbstractMetaArgument::copy() when adding the inherited functions to a AbstractMetaClass. Similar to what was done for AbstractMetaType in 6cad0686101b252cfdbd1a6768a2b02c39aa1d8a, change the type to be based on QSharedData[Pointer]. It can then be passed around and treated like a C++ value type, with Qt sharing the data when possible behind the scenes. * Remove inheritance from AbstractMetaVariable by moving the fields over. * Remove the unused field m_originalName. Change-Id: Ic9e476ca71e163de131fbecc267d0a4e336cb0b9 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/tests/testimplicitconversions.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/tests/testimplicitconversions.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken2/ApiExtractor/tests/testimplicitconversions.cpp b/sources/shiboken2/ApiExtractor/tests/testimplicitconversions.cpp
index a48298bf7..309314445 100644
--- a/sources/shiboken2/ApiExtractor/tests/testimplicitconversions.cpp
+++ b/sources/shiboken2/ApiExtractor/tests/testimplicitconversions.cpp
@@ -59,7 +59,7 @@ void TestImplicitConversions::testWithPrivateCtors()
const AbstractMetaClass *classC = AbstractMetaClass::findClass(classes, QLatin1String("C"));
AbstractMetaFunctionList implicitConvs = classA->implicitConversions();
QCOMPARE(implicitConvs.count(), 1);
- QCOMPARE(implicitConvs.constFirst()->arguments().constFirst()->type().typeEntry(),
+ QCOMPARE(implicitConvs.constFirst()->arguments().constFirst().type().typeEntry(),
classC->typeEntry());
}
@@ -89,7 +89,7 @@ void TestImplicitConversions::testWithModifiedVisibility()
const AbstractMetaClass *classB = AbstractMetaClass::findClass(classes, QLatin1String("B"));
AbstractMetaFunctionList implicitConvs = classA->implicitConversions();
QCOMPARE(implicitConvs.count(), 1);
- QCOMPARE(implicitConvs.constFirst()->arguments().constFirst()->type().typeEntry(),
+ QCOMPARE(implicitConvs.constFirst()->arguments().constFirst().type().typeEntry(),
classB->typeEntry());
}