Backport r856781 by tmcguire from trunk to the 4.1 branch:
Backport r856781 by tmcguire from trunk to the 4.1 branch:

Don't crash when replying after changing folder settings.

This was caused by a dangling KMsgBase* in MessageActions.

Now, when a folder is closed (for example by the folder dialog),
emit the selectionChanged() signal to make sure everyone can udpate
their idea about the current selected message.

CCBUG: 170302


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

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