@@ -20,6 +20,7 @@ which are not wrapped by PyQt:
2020#if (PY_VERSION_HEX < 0x02050000)
2121typedef int Py_ssize_t;
2222#endif
23+
2324%End
2425
2526
@@ -29,6 +30,10 @@ template <TYPE>
2930{
3031%TypeHeaderCode
3132#include < QVector>
33+ #if (SIP_VERSION >= 0x040900)
34+ #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
35+ #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
36+ #endif
3237%End
3338
3439%ConvertFromTypeCode
@@ -105,6 +110,10 @@ template <TYPE>
105110{
106111%TypeHeaderCode
107112#include < QVector>
113+ #if (SIP_VERSION >= 0x040900)
114+ #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
115+ #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
116+ #endif
108117%End
109118
110119%ConvertFromTypeCode
@@ -259,6 +268,10 @@ template <TYPE>
259268{
260269%TypeHeaderCode
261270#include < QSet>
271+ #if (SIP_VERSION >= 0x040900)
272+ #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
273+ #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
274+ #endif
262275%End
263276
264277%ConvertFromTypeCode
@@ -309,6 +322,10 @@ template <TYPE>
309322{
310323%TypeHeaderCode
311324#include < QSet>
325+ #if (SIP_VERSION >= 0x040900)
326+ #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
327+ #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
328+ #endif
312329%End
313330
314331%ConvertFromTypeCode
@@ -381,6 +398,10 @@ template<TYPE>
381398{
382399%TypeHeaderCode
383400#include < QMap>
401+ #if (SIP_VERSION >= 0x040900)
402+ #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
403+ #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
404+ #endif
384405%End
385406
386407%ConvertFromTypeCode
@@ -498,6 +519,10 @@ template<TYPE>
498519{
499520%TypeHeaderCode
500521#include < QMap>
522+ #if (SIP_VERSION >= 0x040900)
523+ #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
524+ #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
525+ #endif
501526%End
502527
503528%ConvertFromTypeCode
@@ -598,7 +623,11 @@ template<TYPE1, TYPE2>
598623%MappedType QMap<TYPE1 , TYPE2 *>
599624{
600625%TypeHeaderCode
601- #include < qmap.h>
626+ #include < QMap>
627+ #if (SIP_VERSION >= 0x040900)
628+ #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
629+ #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
630+ #endif
602631%End
603632
604633%ConvertFromTypeCode
@@ -706,6 +735,10 @@ template<double, TYPE2>
706735{
707736%TypeHeaderCode
708737#include < QMultiMap>
738+ #if (SIP_VERSION >= 0x040900)
739+ #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
740+ #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
741+ #endif
709742%End
710743
711744%ConvertFromTypeCode
@@ -824,6 +857,10 @@ template<double, TYPE2>
824857{
825858%TypeHeaderCode
826859#include < QMap>
860+ #if (SIP_VERSION >= 0x040900)
861+ #define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
862+ #define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
863+ #endif
827864%End
828865
829866%ConvertFromTypeCode
0 commit comments