diff --git a/servicejob.cpp b/servicejob.cpp index 7856c7f82..9588dceb7 100644 --- a/servicejob.cpp +++ b/servicejob.cpp @@ -40,11 +40,6 @@ public: QString operation; QMap parameters; QVariant result; - - void slotStart() - { - q->start(); - } }; ServiceJob::ServiceJob(const QString &destination, const QString &operation, @@ -84,6 +79,11 @@ void ServiceJob::setResult(const QVariant &result) d->result = result; } +void ServiceJob::start() +{ + setResult(false); +} + } // namespace Plasma #include "servicejob.moc" diff --git a/servicejob.h b/servicejob.h index 3ade11d57..2c51efa5b 100644 --- a/servicejob.h +++ b/servicejob.h @@ -97,6 +97,12 @@ public: */ QVariant result() const; + /** + * Default implementation of start, which simply sets the results to false. + * This makes it easy to create a "failure" job. + */ + virtual void start(); + protected: /** * Sets the result for an operation. @@ -104,8 +110,6 @@ protected: void setResult(const QVariant &result); private: - Q_PRIVATE_SLOT(d, void slotStart()) - ServiceJobPrivate * const d; };