Some porting from KIO::Jobs to KJobs

David Faure faure at kde.org
Tue Jan 16 01:27:55 GMT 2007


On Monday 15 January 2007 20:06, Rafael Fernández López wrote:
> Now I'm asking, is possible that sometime an app creates a job based
> on KJob class ? 
Sure.

> What if it wants to use some signals slots and they 
> have to be propagated to the uiserver ? 
Sure, no problem there, that's what KJob is for, and it's good that you're making
uiserver ready for that. The question is: would such a non-kio job possibly have a
totalFiles signal? That's the whole question. I initially discarded that it might ever
happen, but actually I have changed my mind now. It can easily happen, I even used
the notion of "total files" in a uiserver progressdialog created by the kolab resource.
That code uses the uiserver DBus interface directly though, it doesn't need a job observer.
However with kjob it might be done differently in the future.

I withdraw my objection, except that a few technical details still need to be solved.

If KJob doesn't get those signals itself, then
1) Observer needs to document that it can care about those signals even though
there are not in the base KJob class
and
2) Observer needs code to auto-detect whether those signals are available in the
job, to avoid runtime warnings. This can be done using QMetaObject.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list