D28761: T6446 Fix order of the GnuPG options

Andrey Legayev noreply at phabricator.kde.org
Wed Apr 22 17:11:01 BST 2020


andreylegayev added inline comments.

INLINE COMMENTS

> dvratil wrote in cryptoconfigmodule.cpp:236
> Make it `static`, there's no need to initialize this every time. It could also be something more efficient than `QStringList`, like `std::array` (since we know the size of the list beforehand).

Makes sense. Done. 
I'm not writing on C++ every day and I'm curious is there difference: `const static` or `static const` in this particular place ?

> dvratil wrote in cryptoconfigmodule.cpp:263
> You could just resolve the `others` list using another `for` loop and `!result.contains()` and get rid of all the `QSet`s completely. The `order` list as well as the `components` list will always be short enough so that the two QSets (and the cost of constructing and subtracting them) will not be measurably faster than two `for` loops and a linear check.

You're right. I didn't think about small amount of items, tried to write universal code. 
Added another `for`. Pls check new version.

REPOSITORY
  R90 PIM: Kleo Library

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

To: andreylegayev, mlaurent, dvratil
Cc: dvratil, kde-pim, andreylegayev, fbampaloukas, dcaliste, dvasin, rodsevich, ach, winterz, vkrause, mlaurent, knauss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200422/e75dcada/attachment.html>


More information about the kde-pim mailing list