Pages
API Documentation
On this page

KCompositeJob Class

The base class for all jobs able to be composed of one or more subjobs. More...

  • Header: #include <KCompositeJob>
  • CMake: find_package(KF6 REQUIRED COMPONENTS CoreAddons)
    target_link_libraries(mytarget PRIVATE KF6::CoreAddons)
  • Inherits: KJob

List of all members, including inherited members

Public Functions

Public Slots

Protected Functions

Detailed Description

Member Function Documentation

[explicit] KCompositeJob::KCompositeJob(QObject *parent = nullptr)

Creates a new KCompositeJob object.

parent the parent QObject

[virtual protected] bool KCompositeJob::addSubjob(KJob *job)

Add a job that has to be finished before a result is emitted. This has obviously to be called before the result has been emitted by the job.

Note that the composite job takes ownership of job

job the subjob to add

Returns true if the job has been added correctly, false otherwise

[protected] void KCompositeJob::clearSubjobs()

Clears the list of subjobs.

Note that this will *not* delete the subjobs. Ownership of the subjobs is passed on to the caller.

[protected] bool KCompositeJob::hasSubjobs() const

Checks if this job has subjobs running.

Returns true if we still have subjobs running, false otherwise

[virtual protected] bool KCompositeJob::removeSubjob(KJob *job)

Mark a sub job as being done.

The ownership of job is passed on to the caller.

job the subjob to remove

Returns true if the job has been removed correctly, false otherwise

[virtual protected slot] void KCompositeJob::slotInfoMessage(KJob *job, const QString &message)

Forward signal from subjob.

job the subjob

message the info message

See also infoMessage()

[virtual protected slot] void KCompositeJob::slotResult(KJob *job)

Called whenever a subjob finishes.

Default implementation checks for errors and propagates to parent job, and in all cases it calls removeSubjob.

job the subjob

[protected] const QList<KJob *> &KCompositeJob::subjobs() const

Returns the full list of sub jobs

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.