aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shibokengenerator.cpp5
-rw-r--r--tests/libsample/objecttype.cpp5
-rw-r--r--tests/libsample/objecttype.h2
-rw-r--r--tests/samplebinding/typesystem_sample.xml2
4 files changed, 12 insertions, 2 deletions
diff --git a/shibokengenerator.cpp b/shibokengenerator.cpp
index 4fd54f746..d14535cda 100644
--- a/shibokengenerator.cpp
+++ b/shibokengenerator.cpp
@@ -303,7 +303,10 @@ static QString baseConversionString(QString typeName)
void ShibokenGenerator::writeBaseConversion(QTextStream& s, const TypeEntry* type)
{
- s << baseConversionString(type->name());
+ QString typeName = type->name();
+ if (type->isObject())
+ typeName.append('*');
+ s << baseConversionString(typeName);
}
void ShibokenGenerator::writeBaseConversion(QTextStream& s, const AbstractMetaType* type,
diff --git a/tests/libsample/objecttype.cpp b/tests/libsample/objecttype.cpp
index 0fd312658..d5bdace14 100644
--- a/tests/libsample/objecttype.cpp
+++ b/tests/libsample/objecttype.cpp
@@ -221,3 +221,8 @@ ObjectTypeLayout* ObjectType::takeLayout()
return l;
}
+unsigned int objectTypeHash(const ObjectType* objectType)
+{
+ return reinterpret_cast<std::size_t>(objectType);
+}
+
diff --git a/tests/libsample/objecttype.h b/tests/libsample/objecttype.h
index 3fe606de8..3679b3b77 100644
--- a/tests/libsample/objecttype.h
+++ b/tests/libsample/objecttype.h
@@ -108,5 +108,7 @@ private:
ObjectTypeLayout* m_layout;
};
+LIBSAMPLE_API unsigned int objectTypeHash(const ObjectType* objectType);
+
#endif // OBJECTTYPE_H
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index 77d10ef8f..05306f68c 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -64,7 +64,7 @@
<object-type name="Derived" polymorphic-id-expression="%1->type() == Derived::TpDerived" />
<value-type name="Derived::SomeInnerClass" />
- <object-type name="ObjectType">
+ <object-type name="ObjectType" hash-function="objectTypeHash">
<modify-function signature="event(Event*)">
<modify-argument index="1" invalidate-after-use="yes"/>
</modify-function>