[Kde-pim] Review Request: Add a safe ensureParsed() method to KMime::Contents

Ingo Klöcker kloecker at kde.org
Sat Feb 25 20:51:50 GMT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104078/#review10901
-----------------------------------------------------------



kmime/kmime_content.cpp
<http://git.reviewboard.kde.org/r/104078/#comment8833>

    Superfluous newline.



kmime/kmime_content.cpp
<http://git.reviewboard.kde.org/r/104078/#comment8832>

    Why not simply
      if ( !d->parsed ) {
        parse();
      }
    ?
    It's shorter and easier to read.



kmime/kmime_content.cpp
<http://git.reviewboard.kde.org/r/104078/#comment8834>

    Here d->head is changed. Doesn't this invalid a previous parsing?
    



kmime/kmime_content.cpp
<http://git.reviewboard.kde.org/r/104078/#comment8835>

    Here d->body is changed. Doesn't this invalid a previous parsing?
    



kmime/kmime_content.cpp
<http://git.reviewboard.kde.org/r/104078/#comment8836>

    Here d->body is changed. Doesn't this invalid a previous parsing?
    
    Here I stopped looking for further places which might invalidate a previous parsing.


- Ingo Klöcker


On Feb. 25, 2012, 7:07 p.m., Szymon Stefanek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104078/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2012, 7:07 p.m.)
> 
> 
> Review request for KDEPIM and KDEPIM-Libraries.
> 
> 
> Description
> -------
> 
> This patch adds an ensureParsed() method to KMime::Contents.
> Unlike parse(), ensureParsed() can be called multiple times without
> breaking the message body.
> 
> So in turn users of KMime::Contents that do not know if parse() has been
> called on the message they are handling can always call ensureParsed().
> 
> This is a part of a larger fix for bug 291171
> 
> 
> This addresses bug 291171.
>     http://bugs.kde.org/show_bug.cgi?id=291171
> 
> 
> Diffs
> -----
> 
>   kmime/kmime_content.h 05f67c2 
>   kmime/kmime_content.cpp 37ca474 
>   kmime/kmime_content_p.h f09d293 
> 
> Diff: http://git.reviewboard.kde.org/r/104078/diff/
> 
> 
> Testing
> -------
> 
> Compiled and tested. Along with another patch to kdepim it fixes bug 291171.
> 
> 
> Thanks,
> 
> Szymon Stefanek
> 
>

_______________________________________________
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