Port to setAutoSaveSettings so that saving happens before hiding.
Summary:
See d35a882895 in kxmlgui for more complete explanation.
BUG: 396339
CCBUG: 395988
Test Plan: kmail ; Alt+F4 ; kmail -> now the statusbar and toolbar are visible again
Reviewers: ngraham, elvisangelaccio, broulik, cfeck, mlaurent
Reviewed By: mlaurent
Subscribers: kde-pim
Tags: KDE PIM
Differential Revision: https://phabricator.kde.org/D14454