Bug 125920

Summary: [PATCH] Rebuilding index files breaks "subject threading" for existing messages
Product: [Applications] kmail Reporter: A. Pfaller <apfaller>
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:
Attachments: Fix for subject threading problem

Description A. Pfaller 2006-04-19 23:21:28 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Compiled From Sources
Compiler:          gcc version 4.0.2 20050901 (prerelease) (SUSE Linux) as shipped with SuSE 10.0
OS:                Linux

Subject threading depends on correctly initialized message prefixes so
that the prefixes can be stripped from the subject line when calculating
the MD5 hash used for detecting identical subject lines.
However index rebuilding is started before these prefixes are initalized.

Patch with fix follows.

Andreas
Comment 1 A. Pfaller 2006-04-19 23:22:54 UTC
Created attachment 15697 [details]
Fix for subject threading problem
Comment 2 A. Pfaller 2006-06-03 04:51:23 UTC
Still not fixed in kmail 1.9.3 / KDE 3.5.3. Is there something wrong
with my patch?
Comment 3 Thomas McGuire 2007-06-05 23:58:48 UTC
>Still not fixed in kmail 1.9.3 / KDE 3.5.3. Is there something wrong with my patch? 
Probably nobody has seen it yet. Write a mail to the kde-pim mailinglist or contact someone at the #kontact IRC channel to get your patch reviewed and committed.
Comment 4 Allen Winter 2007-06-06 06:06:43 UTC
SVN commit 672014 by winterz:

Fix bug "Rebuilding index files breaks "subject threading" for existing messages"
Patch from A. Pfaller. thanks!

BUGS: 125920


 M  +3 -2      kmkernel.cpp  


--- branches/KDE/3.5/kdepim/kmail/kmkernel.cpp #672013:672014
@@ -1464,6 +1464,9 @@
     kdDebug(5006) << k_funcinfo << "foldersPath (after transferMail): '" << foldersPath << "'" << endl;
   }
 
+  // moved up here because KMMessage::stripOffPrefixes is used below
+  KMMessage::readConfig();
+
   the_undoStack     = new UndoStack(20);
   the_folderMgr     = new KMFolderMgr(foldersPath);
   the_imapFolderMgr = new KMFolderMgr( KMFolderImap::cacheLocation(), KMImapDir);
@@ -1479,8 +1482,6 @@
   the_popFilterMgr     = new KMFilterMgr(true);
   the_filterActionDict = new KMFilterActionDict;
 
-  // moved up here because KMMessage::stripOffPrefixes is used below -ta
-  KMMessage::readConfig();
   initFolders(cfg);
   the_acctMgr->readConfig();
   the_filterMgr->readConfig();