Bug 161615

Summary: mail viewer: "From:" header suppresses email address in "long" mode
Product: [Applications] kmail Reporter: Melchior Franz <mfranz>
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:

Description Melchior Franz 2008-05-04 16:24:58 UTC
Version:           svn/head 3.* branch as of today (2008/05/04) (using KDE 3.5.9)
Installed from:    Compiled From Sources
Compiler:          gcc (GCC) 4.2.1 (SUSE Linux) libc 2.6.1 (20070803)
OS:                Linux

In today's kmail (SVN/HEAD 3.* branch) the "long" header shows only the sender's name, but suppresses the email address. This used to work for years and must have been broken in the last weeks. The arguments to KMMessage::emailAddrAsAnchor() are apparently set wrongly. (The same fix may also be necessary elsewhere.)

$ svn diff
Index: headerstyle.cpp
===================================================================
--- headerstyle.cpp     (revision 803929)
+++ headerstyle.cpp     (working copy)
@@ -290,7 +290,7 @@
       if ( fromStr.isEmpty() ) // no valid email in from, maybe just a name
         fromStr = message->fromStrip(); // let's use that
       headerStr.append(i18n("From: ") +
-          KMMessage::emailAddrAsAnchor( fromStr, "", false) );
+          KMMessage::emailAddrAsAnchor( fromStr, false, "", true ) );
       if ( !vCardName.isEmpty() )
         headerStr.append("&nbsp;&nbsp;<a href=\"" + vCardName +
               "\">" + i18n("[vCard]") + "</a>" );
Comment 1 Thomas McGuire 2008-05-04 17:33:45 UTC
Confirmed in 3.5 branch, but already fixed in trunk (KDE4).
For 3.5, someone should apply your patch, but I don't have a 3.5 SVN checkout at all.
Comment 2 Melchior Franz 2008-05-04 17:47:42 UTC
SVN commit 803960 by mfranz:

Don't strip 'From:' email address in emailAddrAsAnchor() in "plain"
header mode. This has already been done before.

CCBUG: 161615


 M  +1 -1      headerstyle.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=803960
Comment 3 Thomas McGuire 2008-05-04 17:53:36 UTC
Thanks for committing it!