Port to setAutoSaveSettings so that saving happens before hiding.
ClosedPublic

Authored by dfaure on Jul 29 2018, 11:09 AM.

Details

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

Diff Detail

Repository
R206 KMail
Branch
setautosavesettings
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1324
Build 1342: arc lint + arc unit
dfaure created this revision.Jul 29 2018, 11:09 AM
Restricted Application added a project: KDE PIM. · View Herald TranscriptJul 29 2018, 11:09 AM
Restricted Application edited subscribers, added: kde-pim; removed: KDE PIM. · View Herald Transcript
dfaure requested review of this revision.Jul 29 2018, 11:09 AM
mlaurent added inline comments.Jul 31 2018, 5:26 AM
src/kmmainwin.cpp
100

now it's not necessary to call "KMKernel::self()->config()->sync();" ?

dfaure added inline comments.Jul 31 2018, 7:40 AM
src/kmmainwin.cpp
100

KConfig::sync is already called many many times, on the KMKernel config object, actually.

  • In KMMainWidget, destruct() calls writeConfig(bool), which syncs.
  • MessageList::Pane::~Pane(), same thing
  • MessageList::Core::Manager::~Manager() calls saveConfiguration() which syncs

And more importantly (more reliably after KMMainWin), ~KMKernel calls KMKernel::slotSyncConfig() which does both KCoreConfigSkeleton::save() (which syncs) and a direct call to sync() (I'll remove that one...)

mlaurent accepted this revision.Jul 31 2018, 11:56 AM
mlaurent added inline comments.
src/kmmainwin.cpp
100

Ah ok indeed.
Thanks

This revision is now accepted and ready to land.Jul 31 2018, 11:56 AM
dfaure closed this revision.Jul 31 2018, 1:46 PM