Commit b73e783f authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

IncidenceFetchJob: don't get stuck when no calendar collections exist

The job never emitted finished() when the CollectionFetchJob returned no
collections. This causes KMail to get stuck when user opens an invitation
without having any calendar resource set up.

BUG: 297930
FIXED-IN: 4.14.4
parent 8eb9bdd1
......@@ -55,6 +55,12 @@ void Akonadi::IncidenceFetchJob::collectionFetchResult(KJob* job)
return;
CollectionFetchJob *fetch = qobject_cast<CollectionFetchJob*>(job);
Q_ASSERT(fetch);
if (fetch->collections().isEmpty()) {
emitResult();
return;
}
foreach(const Collection &col, fetch->collections()) {
if (!m_mimeTypeChecker.isWantedCollection(col) || col.isVirtual())
continue;
......
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