When the last mail in the outbox is sent, cleanup is called, which calls compact, which emits folder changed, which calls msgChanged, which emits maybeDeleting, which calls KMReaderWin::clearCache, which disables the updateTimer which has been started by KMReaderWin::setMsg (0) and which, had it not been prevented from doing so by the above, would have cleared the main message reader window, thereby preventing crashes when the still visible parts (message body and mime parts) of a mail that is gone from the outbox are accessed.
When the last mail in the outbox is sent, cleanup is called, which calls
compact, which emits folder changed, which calls msgChanged, which emits
maybeDeleting, which calls KMReaderWin::clearCache, which disables the
updateTimer which has been started by KMReaderWin::setMsg (0) and which,
had it not been prevented from doing so by the above, would have cleared
the main message reader window, thereby preventing crashes when the still
visible parts (message body and mime parts) of a mail that is gone from
the outbox are accessed.

I've fixed this by explicitly clearing the view in clearCache. Since I
assume clearCache is there to prevent still running timers from accessing
messages which are no longer there, that seems like a decent fix. I'd like
a second opinion on this, though.

CCMAIL: 48686-done@bugs.kde.org

svn path=/trunk/kdepim/; revision=230366

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