[Kde-pim] Re: Review Request: Always generate a Message-ID header when composing a message
Ingo Klöcker
kloecker at kde.org
Sun Feb 20 11:06:41 GMT 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100690/#review1524
-----------------------------------------------------------
messagecomposer/skeletonmessagejob.cpp
<http://git.reviewboard.kde.org/r/100690/#comment1282>
I'd use the ?: operator here which would allow to make fqdn const and would save an unnecessary call of QHostInfo::localHostName() (if the custom suffix is used).
messagecomposer/tests/skeletonmessagejobtest.cpp
<http://git.reviewboard.kde.org/r/100690/#comment1283>
I don't think it's good style to extend the subject test. Each test should be as self-contained as possible. Therefore I suggest to create a separate test method for testing message ID.
Also I suggest to replace the QCOMPARE with
QVERIFY( message->messageID( false ) );
QVERIFY( !message->messageID( false )->isEmpty() );
The first line verifies that the header does exist. The second line verifies that it's not empty. Using only the second line would lead to a crash if the header does not exist.
- Ingo
On Feb. 20, 2011, 10:32 a.m., Torgny Nyblom wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100690/
> -----------------------------------------------------------
>
> (Updated Feb. 20, 2011, 10:32 a.m.)
>
>
> Review request for KDEPIM.
>
>
> Summary
> -------
>
> Always generate a Message-ID header when composing a message. This header is marked as optional according to the RFC but at the same time a comment says that it really SHOULD be present...
>
> There is a catch... the old unit tests will fail since they do not include the Message-ID header so the tests needs to be adapted but I couldn't figure out how (at least not yet).
>
>
> This addresses bug 266063.
> http://bugs.kde.org/show_bug.cgi?id=266063
>
>
> Diffs
> -----
>
> messagecomposer/composer.cpp da4c791
> messagecomposer/skeletonmessagejob.cpp 69b8c3e
> messagecomposer/tests/skeletonmessagejobtest.h d9db557
> messagecomposer/tests/skeletonmessagejobtest.cpp 46c0dca
>
> Diff: http://git.reviewboard.kde.org/r/100690/diff
>
>
> Testing
> -------
>
> Mail generating and sending works.
> New unit test
>
>
> Thanks,
>
> Torgny
>
>
_______________________________________________
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