MailTransport::PrecommandJob Class

class MailTransport::PrecommandJob
Header: #include <MailTransport/PrecommandJob>
CMake: find_package(KPim6MailTransport REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::MailTransport)
Inherits: KJob

Public Functions

PrecommandJob(const QString &precommand, QObject *parent = nullptr)
virtual ~PrecommandJob() override

Reimplemented Public Functions

virtual void start() override

Reimplemented Protected Functions

virtual bool doKill() override

Detailed Description

Job to execute a command. This is used often for sending or receiving mails, for example to set up a tunnel of VPN connection. Basically this is just a KJob wrapper around a QProcess.

Member Function Documentation

[explicit] PrecommandJob::PrecommandJob(const QString &precommand, QObject *parent = nullptr)

Creates a new precommand job. precommand The command to run. parent The parent object.

[override virtual noexcept] PrecommandJob::~PrecommandJob()

Destroys this job.

[override virtual protected] bool PrecommandJob::doKill()

Reimplements: KJob::doKill().

Reimplemented from KJob. Returns true if the job was killed.

[override virtual] void PrecommandJob::start()

Reimplements: KJob::start().

Executes the precommand. Reimplemented from KJob.