Commit 98d76d37 authored by Laurent Montel's avatar Laurent Montel 😁

Use a KJob here

parent 4e15f15f
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <akonadi/itemcreatejob.h> #include <akonadi/itemcreatejob.h>
FollowupReminderCreateJob::FollowupReminderCreateJob(QObject *parent) FollowupReminderCreateJob::FollowupReminderCreateJob(QObject *parent)
: QObject(parent), : KJob(parent),
mInfo(new FollowUpReminder::FollowUpReminderInfo) mInfo(new FollowUpReminder::FollowUpReminderInfo)
{ {
...@@ -80,7 +80,7 @@ void FollowupReminderCreateJob::start() ...@@ -80,7 +80,7 @@ void FollowupReminderCreateJob::start()
} }
} else { } else {
qDebug()<<"FollowupReminderCreateJob info not valid "; qDebug()<<"FollowupReminderCreateJob info not valid ";
deleteLater(); Q_EMIT emitResult();
return; return;
} }
} }
...@@ -99,5 +99,5 @@ void FollowupReminderCreateJob::slotCreateNewTodo(KJob *job) ...@@ -99,5 +99,5 @@ void FollowupReminderCreateJob::slotCreateNewTodo(KJob *job)
void FollowupReminderCreateJob::writeFollowupReminderInfo() void FollowupReminderCreateJob::writeFollowupReminderInfo()
{ {
FollowUpReminder::FollowUpReminderUtil::writeFollowupReminderInfo(FollowUpReminder::FollowUpReminderUtil::defaultConfig(), mInfo, true); FollowUpReminder::FollowUpReminderUtil::writeFollowupReminderInfo(FollowUpReminder::FollowUpReminderUtil::defaultConfig(), mInfo, true);
deleteLater(); Q_EMIT emitResult();
} }
...@@ -23,8 +23,9 @@ ...@@ -23,8 +23,9 @@
#include <Akonadi/Item> #include <Akonadi/Item>
#include <Akonadi/Collection> #include <Akonadi/Collection>
#include "agents/followupreminderagent/followupreminderinfo.h" #include "agents/followupreminderagent/followupreminderinfo.h"
#include <KJob>
class FollowupReminderCreateJob : public QObject class FollowupReminderCreateJob : public KJob
{ {
Q_OBJECT Q_OBJECT
public: public:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment