[PyQt] [sip] some low level issues with meta enum and flags
Denis Rouzaud
denis.rouzaud at gmail.com
Fri May 18 16:06:20 BST 2018
Hi list, hi Phil,
I have been playing a bit with meta enum and I encountered two issues:
1. If you copy the meta enum object, you get a seg fault.
For instance, doing:
idx = baseClass.staticMetaObject.indexOfEnumerator(enumClass.__name__)
meta_enum = baseClass.staticMetaObject.enumerator(idx)
And then do meta_enum_2 = meta_enum, you'll get a seg fault when trying to
use it (calling any method, while sip.dump still seems to return valid
output).
This is not a huge deal, but it can lead to further issue: if you have a
method where the meta_enum is provided as argument and get copied there.
For instance, we have a method with some MethodCode:
QgsSettings::value( const QString &key, const QVariant &defaultValue =
QVariant() )
While providing the meta enum as default value, if I try to access it
later, I do get a seg fault too.
2. It seems that flags types are not added to the module itself but to the
parant package.
In other words, __qualname__ returns the same than __name__
Which gives troubles at retrieving information.
Can this be fixed?
Thanks for your time,
Cheers,
Denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180518/35e85439/attachment.html>
More information about the PyQt
mailing list