class KJob


abstract

Module kdecore
Namespace
Class KJob
Inherits QObject
The base class for all jobs. For all jobs created in an application, the code looks like

KJob * job = someoperation( some parameters );
connect( job, SIGNAL( result( KJob * ) ),
this, SLOT( slotResult( KJob * ) ) );
job->start();
(other connects, specific to the job)

And slotResult is usually at least:

if ( job->error() )
doSomething();

With the synchronous interface the code looks like

KJob *job = someoperation( some parameters );
if ( !job->exec() )
{
// An error occurred
}
else
{
// Do something
}

@note: KJob and its subclasses is meant to be used in a fire-and-forget way. It's deleting itself when it has finished using deleteLater() so the job instance disappears after the next event loop run.



enums

enum details

methods