[Kde-pim] Review Request: Remove all the signature blocks.
Jaime Torres
jtamate at gmail.com
Wed Mar 25 10:06:01 GMT 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/403/#review613
-----------------------------------------------------------
Modifying the regular expresion to "-- $", the sql comments are not Signature Blocks.
A question:
What do you prefer: To remove text replies or to not remove signature blocks completely?
In the current implementation, if there is a reply block without signature, between parts with signature blocks, it is removed.
Another possibility is to check only for prefix change (even in the case the signature contains > as a prefix), removing only part of the signature.
I do not see a solution to remove them completely if they contains the common reply characters as part of them, like:
text
"-- " (The " are there only to remark the space)
>This is a "not very good signature block"
>
> Reply text
>> Reply Reply text
>> "-- "
>> #Signature Block
- Jaime
On 2009-03-23 09:18:28, Jaime Torres wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/403/
> -----------------------------------------------------------
>
> (Updated 2009-03-23 09:18:28)
>
>
> Review request for KDE PIM.
>
>
> Summary
> -------
>
> Remove all the signature blocks.
> The algorithm is:
> Look for the prefixes before the "-- " marks (i.e. the text before it in the line).
> foreach line, if the line contains "-- ", start to delete lines until the prefix changes.
>
> (it should also work with c code if the -- is not followed by a space).
>
>
> This addresses bug 72316.
> https://bugs.kde.org/show_bug.cgi?id=72316
>
>
> Diffs
> -----
>
> /trunk/KDE/kdepim/kmail/kmmessage.cpp 940552
>
> Diff: http://reviewboard.kde.org/r/403/diff
>
>
> Testing
> -------
>
> If checked with the following code:
> const QString mail="text1\n-- \nSignature Block1\nSignature Block1\n\n> text2\n"\
> "> -- \n> Signature Block 2\n> Signature Block 2\n"\
> ">> text3\n>> text3\n>> -- \n>> Signature Block 3\n>> Signature Block 3\n"\
> "> text4\n> -- \n> Signature Block 4\n"\
> "text5\n-- \nSignature Block 5\n";
> const QString mail1="text1\n-- \nSignature Block1\nSignature Block1\n\n"\
> ">text2\n>-- \n>Signature Block 2\n>Signature Block 2\n" \
> ">>text3\n>>text3\n>>-- \n>>Signature Block 3\n>>Signature Block 3\n"\
> ">text4\n>-- \n>Signature Block 4\n>Signature Block 4\n"\
> "text5\n-- \nSignature Block 5\n";
>
> const QString mail2="Text 1\n-- \nFirst sign\n\n\n> From: bla\n"\
> "> Texto 2\n\n> AquĆ algo de texto.\n\n> --\n> Signature Block 2\n\n> Adios\n"\
> "\n>> Texto 3\n\n>> --\n>> Signature block 3\n";
>
> const QString mail3="-- \n-- ACME, Inc\n-- Joe User\n-- PHB\n-- Tel.: 555 1234\n--";
>
> QString res=stripSignature(mail,1);
> cout<<"res:"<<res.toStdString()<<endl;
> res=stripSignature(mail1,1);
> cout<<"res:"<<res.toStdString()<<endl;
> res=stripSignature(mail2,1);
> cout<<"res:"<<res.toStdString()<<endl;
> res=stripSignature(mail3,1);
> cout<<"res:"<<res.toStdString()<<endl;
>
>
> Thanks,
>
> Jaime
>
>
_______________________________________________
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