[Kde-bindings] [Bug 295948] New: PyKDE4: KMountPoint::List is not special-cased
Josef Spillner
spillner at kde.org
Tue Mar 13 17:40:13 UTC 2012
https://bugs.kde.org/show_bug.cgi?id=295948
Bug ID: 295948
Severity: normal
Version: unspecified
Priority: NOR
Assignee: kde-bindings at kde.org
Summary: PyKDE4: KMountPoint::List is not special-cased
Classification: Unclassified
OS: Linux
Reporter: spillner at kde.org
Hardware: Other
Status: NEW
Component: general
Product: bindings
The C++ flavour of the KDE libraries define an internal KMountPoint::List class
which is a QList. The Python bindings don't treat it as such:
>>> import PyKDE4.kio
>>>
>>> allmountpoints = PyKDE4.kio.KMountPoint.possibleMountPoints()
>>> allmountpoints
<PyKDE4.kio.List object at 0x7f7f5f5c83b0>
>>> dir(allmountpoints)
['__class__', '__delattr__', '__dict__', '__doc__', '__format__',
'__getattribute__', '__hash__', '__init__', '__module__', '__new__',
'__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__',
'__str__', '__subclasshook__', '__weakref__', 'findByDevice', 'findByPath']
>>> len(allmountpoints)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: object of type 'List' has no len()
Apparently, the file kio/kmountpoint.sip needs special-case code just like for
example kurl.sip. The SIP files seem to be generated by a tool called twine but
have a 2008 copyright so I wonder if this would have to be added by hand or
some twine invocation is necessary.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Kde-bindings
mailing list