Return types of KCompositeJob::removeSubjob() and KJob::removeSubjob()
Richard Dale
richard_dale at tipitina.demon.co.uk
Mon Jul 9 20:57:28 BST 2007
On Monday 09 July 2007, Kevin Ottens wrote:
> Le lundi 09 juillet 2007, Richard Dale a écrit :
> > KCompositeJob::removeSubjob() is returns a boolean, while
> > KJob::removeSubjob() is a void method.
>
> I assume you mean KIO::Job::removeSubJob().
Yes, you're right.
> > Should they both either be voids or
> > bools? I can't see anywhere in kdelibs where the reply value from
> > KCompositeJob::removeSubjob() is tested.
>
> The main point for having KCompositeJob::removeSubJob() was to allow
> rejecting some of the add/removeJob operations if needed. But that looks
> fine to me if a subclass wants to have a specific version with no return
> value (which is the case of KIO::Job).
Well C# doesn't like overriden virtual methods with different return types,
which is the reason why I asked. I personally find it a bit confusing, but I
can special case it ok in C# with a 'new' modifier for the
KIO.Job.RemoveSubjob() method.
-- Richard
More information about the kde-core-devel
mailing list