Don't call KJob::emitResult() from KJob::start() ?

Friedrich W. H. Kossebau kossebau at
Thu Jun 26 14:54:29 BST 2008


I found out with KJob one cannot call emitResult already in the start() 
method, because at least if KJob is run synchronously then the code will hang 
in the eventloop, which is only started after KJob::start():
	bool KJob::exec()
		QEventLoop loop( this );

		connect( this, SIGNAL( result( KJob* ) ), &loop, SLOT( quit() ) );

		return ( d->error == NoError );

Is this intended?

If it is, is the attached patch for the API dox okay to commit, especially the 
extension of the KJob::start() docs?

Okteta - KDE Hex Editor, coming to you with KDE 4.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: more-details-for-kjob-start-method.patch
Type: text/x-diff
Size: 2165 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list