Bug 211070

Summary: Missing support in PyKDE4 for KIO.Job's result( KJob *) signal using the new stype API
Product: [Developer tools] bindings Reporter: Luca Beltrame <lbeltrame>
Component: generalAssignee: kde-bindings
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Unspecified   
Latest Commit: Version Fixed In: 4.5.0

Description Luca Beltrame 2009-10-19 13:28:43 UTC
Version:            (using KDE 4.3.2)
Installed from:    SuSE RPMs

In parallel with the changes in recent versions of PyQt, PyKDE4 has adopted the new style API for signal/slot connections (i.e. OBJECT.SIGNAL.connect(SLOT) ). 
It works perfectly in most of the bindings, but in KIO.Job and derived subclasses there is no way to access the "result" signal without using the old API (SIGNAL("C++ signature")).

Given an example job:

get_job = KIO.get(KUrl("http://www.example.com/index.html"))

This is possible:

QtCore.QObject.connect(get_job, QtCore.SIGNAL("result( KJob *)"), some_slot)

while this raises an exception, as "result" is not present in "get_job":

get_job.result.connect(some_slot)

As new-stype API is also used in other parts PyKDE4, this should - if technically possible - be addressed.
Comment 1 Luca Beltrame 2010-06-28 23:40:40 UTC
This is fixed in KDE SC 4.5 RC1 (tested with a simple program: the result slot gets called correctly instead of raising an exception). Closing.