[Kde-pim] mailto: url dragging

Martin Koller kollix at aon.at
Tue Aug 4 17:02:44 BST 2009


Hi,

I'm about to look into https://bugs.kde.org/show_bug.cgi?id=138725
which shows the RFC2047 encoded mail address when one drops an address
from one mailreader windows header to a composer window.

My idea to fix this is the following:

Index: kmlineeditspell.cpp
===================================================================
--- kmlineeditspell.cpp (Revision 1005628)
+++ kmlineeditspell.cpp (Arbeitskopie)
@@ -130,7 +130,12 @@
       // email-address.
       if ( url.protocol() == "mailto" ) {
         KABC::Addressee addressee;
-        addressee.insertEmail( url.path(), true /* preferred */ );
+        QString address = url.path();
+        if ( address.startsWith( "=?" ) ) {
+          // RFC2047 encoded string, decode it
+          address = KMMsgBase::decodeRFC2047String( address.toLatin1() );
+        }
+        addressee.insertEmail( address, true /* preferred */ );
         list += addressee;
       }


however, it's not clear for me if the Drag object itself shouldn't already contain the decoded path ?
Otherwise each receiver of this drag object needs to do the decoding.

-- 
Best regards/Schöne Grüße

Martin    ()  ascii ribbon campaign - against html mail 
          /\                        - against microsoft attachments

Geschenkideen, Accessoires, Seifen, Kulinarisches: www.bibibest.at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20090804/c54bf64f/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list