D22352: Add option --raw for the show command.

Kevin Krammer noreply at phabricator.kde.org
Sat Jul 27 23:31:07 BST 2019


krake requested changes to this revision.
krake added a comment.
This revision now requires changes to proceed.


  Thanks!
  
  One minor wish added :-)

INLINE COMMENTS

> showcommand.cpp:105
>              } else {
> -                std::cout << item.payloadData().constData();    // output the raw payload
> +                if (!mRaw && item.hasPayload<KMime::Message::Ptr>()) {
> +                    const KMime::Message::Ptr mail = item.payload<KMime::Message::Ptr>();

Can I ask to move the mRaw check to  else above?
I.e. make it

  } else if (mRaw) {
  } else {
  }

For non-emails the "not raw" should then do something like

  std::cout << qPrintable(QString::fromUtf8(item.payloadData().constData());

Rational: if the local encoding is not UTF-8 then "raw" would still write the internal UTF-8 data (raw == not modified or recoded) but the "not raw" branch would recode to local8Bit

REPOSITORY
  R723 Akonadi CLI Client

REVISION DETAIL
  https://phabricator.kde.org/D22352

To: dfaure, marten, krake
Cc: kde-pim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20190727/5fb5b930/attachment.html>


More information about the kde-pim mailing list