Skip to content

Fix KalendarAc quitting immediately after initializing

Daniel Vrátil requested to merge work/dvratil/fix-kcalendarac-quitting into master

The app uses QGuiApplication, but has no windows, so the event loop refcounter is zero by default. Unfortunately for us, KJob internally uses QEventLoopLocker to prevent a QApplication from quitting when the last window is closed while a KJob is still running. So after the ETMCalendar is populated from Akonadi and the last Akonadi job (which is a KJob) finishes, the last QEventLoopLocker is destroyed and the event loop refcount drops to zero again, causing the QGuiApplication to quit.

This seems to be caused by some change in Qt6 as I couldn't reproduce the behavior on Qt5.

Merge request reports