https://bugs.kde.org/show_bug.cgi?id=274937

           Summary: kabcclient's mutt output repeats first name
           Product: kdepim
           Version: 4.4
          Platform: FreeBSD Ports
        OS/Version: FreeBSD
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: libkdepim
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=60628)
 --> (http://bugs.kde.org/attachment.cgi?id=60628)
Solves problem and adds 'includenickname' functionality

Version:           4.4 (using KDE 4.5.5) 
OS:                FreeBSD

kabcclient --list --of mutt reports
alias jdoe John John <[email protected]>
instead of
alias jdoe John Doe <[email protected]>

It behaves like that despite the 'altkeys' option being used or not.

Reproducible: Always

Steps to Reproduce:
Run kabcclient --list --of mutt

Actual Results:  
alias jdoe John John <[email protected]>

Expected Results:  
alias jdoe John Doe <[email protected]>

The code at kdepim-4.4.11.1/console/kabcclient/src/outputformatimpls.cpp
said:

stream << fromUnicode(m_codec, addressee.givenName()) << " "
       << fromUnicode(m_codec, addressee.familyName())<< " <"
       << fromUnicode(m_codec, *it)                   << ">";

For some reason the stream would get corrupted and either repeat the second
parameter or put garbage instead of it (in some tests).

The solution was splitting the call to the stream as in:


stream << fromUnicode(m_codec, addressee.givenName()) << " ";
stream << fromUnicode(m_codec, addressee.familyName())<< " <"
       << fromUnicode(m_codec, *it)                   << ">";

Also, I wanted to have aliases for nicknames, so if John Doe has a nick name
johnny, I can have also

alias johnny Joe Doe <[email protected]>

To that purpose the attached patch adds the option 'includenickname'.

Thanks!

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Kdepim-bugs mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kdepim-bugs

Reply via email to