Backport r831845 by tmcguire to the 4.1 branch:
Backport r831845 by tmcguire to the 4.1 branch:

Also quit the event loop when a part still holds a reference to a KGlobal object,
probably by a KJob which wasn't properly deleted.

This fixes that the Kontact process was still running (without a window) after viewing
an article in Akregator.

The real fix would be to fix Akregator, it should take care of properly cleaning
up each KJob.

@David: maybe KJob::allowQuitWhileJobsAreRunning(bool) wasn't such a bad idea after all?

CCCCBUG: 163479
CCBUG: 166367

svn path=/branches/KDE/4.1/kdepim/; revision=831851

lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi