Commit 4e15f15f authored by Laurent Montel's avatar Laurent Montel 😁

Make it async

parent 67a7dd54
......@@ -47,14 +47,6 @@ void CreateEventJob::start()
Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob( mItem );
job->fetchScope().fetchFullPayload();
connect( job, SIGNAL(result(KJob*)), this, SLOT(slotFetchDone(KJob*)) );
if ( job->exec() ) {
if ( job->items().count() == 1 ) {
mItem = job->items().first();
}
} else {
qDebug()<<" createTodo Error during fetch: "<<job->errorString();
}
} else {
createEvent();
}
......@@ -67,6 +59,7 @@ void CreateEventJob::slotFetchDone(KJob *job)
if ( fetchJob->items().count() == 1 ) {
mItem = fetchJob->items().first();
} else {
qDebug()<<" createTodo Error during fetch: "<<job->errorString();
Q_EMIT emitResult();
return;
}
......
......@@ -47,14 +47,6 @@ void CreateTodoJob::start()
Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob( mItem );
job->fetchScope().fetchFullPayload();
connect( job, SIGNAL(result(KJob*)), this, SLOT(slotFetchDone(KJob*)) );
if ( job->exec() ) {
if ( job->items().count() == 1 ) {
mItem = job->items().first();
}
} else {
qDebug()<<" createTodo Error during fetch: "<<job->errorString();
}
} else {
createTodo();
}
......@@ -67,6 +59,7 @@ void CreateTodoJob::slotFetchDone(KJob *job)
if ( fetchJob->items().count() == 1 ) {
mItem = fetchJob->items().first();
} else {
qDebug()<<" createTodo Error during fetch: "<<job->errorString();
Q_EMIT emitResult();
return;
}
......
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