Bug 127538

Summary: komposer html formatting option change desn't get stored, when closing session
Product: [Unmaintained] kmail Reporter: Carsten Lohrke <carstenlohrke>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Carsten Lohrke 2006-05-18 00:35:07 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Compiled From Sources

When I close the KDE session without explicitly closing KMail before, the formatting option change doesn't get stored - and I do run a KMail with all the latest config related code changes aplied to the 3.5 branch.
Comment 1 Ingo Klöcker 2006-05-18 10:51:30 UTC
Comment for the developers: When closing the composer window the setting is stored via KConfigXT by calling 
  GlobalSettings::self()->setUseHtmlMarkup( mHtmlMarkup );
in KMComposeWin::writeConfig() which is called by ~KMComposeWin.

And in KMKernel::~KMKernel() we call GlobalSettings::self()->writeConfig();

So I have no idea why the changed setting isn't stored when the session is closed unless KMail is killed before ~KMKernel() is called.

Carsten, please try whether adding
  GlobalSettings::self()->writeConfig();
to the end of KMComposeWin::writeConfig() in kmcomposewin.cpp solves the problem.
Comment 2 Carsten Lohrke 2006-05-18 20:43:56 UTC
Adding the line fixed it.
Comment 3 Ingo Klöcker 2006-06-02 23:53:10 UTC
SVN commit 547653 by kloecker:

Fix bug 127538 by writing config changes to disk when the composer window is closed.
BUG:127538

 M  +2 -0      kmcomposewin.cpp  


--- branches/KDE/3.5/kdepim/kmail/kmcomposewin.cpp #547652:547653
@@ -667,6 +667,8 @@
 
   KConfigGroupSaver saver( KMKernel::config(), "Geometry" );
   saveMainWindowSettings( KMKernel::config(), "Composer" );
+  // make sure config changes are written to disk, cf. bug 127538
+  GlobalSettings::self()->writeConfig();
 }
 
 //-----------------------------------------------------------------------------