Bug 295948 - PyKDE4: KMountPoint::List is not special-cased
Summary: PyKDE4: KMountPoint::List is not special-cased
Status: RESOLVED UNMAINTAINED
Alias: None
Product: bindings
Classification: Developer tools
Component: pykde (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-13 17:40 UTC by Josef Spillner
Modified: 2018-11-17 05:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josef Spillner 2012-03-13 17:40:13 UTC
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.
Comment 1 Andrew Crouthamel 2018-11-17 05:30:01 UTC
Hello, unfortunately this bug is being closed as unmaintained, per request of einar77.