Return types of KCompositeJob::removeSubjob() and KJob::removeSubjob()

Richard Dale richard_dale at tipitina.demon.co.uk
Mon Jul 9 19:12:51 BST 2007


KCompositeJob::removeSubjob() is returns a boolean, while KJob::removeSubjob() 
is a void method. Should they both either be voids or bools? I can't see 
anywhere in kdelibs where the reply value from KCompositeJob::removeSubjob() 
is tested.

KJob::removeSubjob() looks like this:

void Job::removeSubjob( KJob *jobBase, bool mergeMetaData )
{
    KIO::Job *job = dynamic_cast<KIO::Job*>( jobBase );

    if ( job == 0 )
    {
        return;
    }

    if ( mergeMetaData )
        m_incomingMetaData += job->metaData();

    KCompositeJob::removeSubjob( job );
}

And the KCompositeJob version looks like this:

bool KCompositeJob::removeSubjob( KJob *job )
{
    if ( job == 0 )
    {
        return false;
    }

    d->subjobs.removeAll( job );

    return true;
}

-- Richard




More information about the kde-core-devel mailing list