Bug 127538 - komposer html formatting option change desn't get stored, when closing session
Summary: komposer html formatting option change desn't get stored, when closing session
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-18 00:35 UTC by Carsten Lohrke
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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();
 }
 
 //-----------------------------------------------------------------------------