Modified PySideQFlags based on Hugo's design.
This commit is contained in:
parent
8145f2a7e2
commit
b643a3f8ab
1 changed files with 4 additions and 1 deletions
|
|
@ -33,6 +33,7 @@ extern "C" {
|
||||||
struct PySideQFlagsType
|
struct PySideQFlagsType
|
||||||
{
|
{
|
||||||
PyHeapTypeObject super;
|
PyHeapTypeObject super;
|
||||||
|
SbkConverter** converterPtr;
|
||||||
SbkConverter* converter;
|
SbkConverter* converter;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -127,6 +128,9 @@ namespace QFlags
|
||||||
type->tp_as_number = numberMethods;
|
type->tp_as_number = numberMethods;
|
||||||
type->tp_richcompare = &PySideQFlagsRichCompare;
|
type->tp_richcompare = &PySideQFlagsRichCompare;
|
||||||
|
|
||||||
|
PySideQFlagsType* flagsType = reinterpret_cast<PySideQFlagsType*>(type);
|
||||||
|
flagsType->converterPtr = &flagsType->converter;
|
||||||
|
|
||||||
if (PyType_Ready(type) < 0)
|
if (PyType_Ready(type) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
@ -146,4 +150,3 @@ namespace QFlags
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue