D6516: Fix selecting the color from a set of filters

Justus Winter noreply at phabricator.kde.org
Wed Jul 5 16:10:23 BST 2017


justusw created this revision.
Restricted Application added a project: KDE PIM.
Restricted Application added a subscriber: KDE PIM.

REVISION SUMMARY
  Invert the condition.  Previously, filters were ignored that presented
  a valid color.  Now those with a valid color are selected.  This was
  likely a copy&paste error from 'get_string'.
  
  Signed-off-by: Justus Winter <justus at gnupg.org>
  
  Refactor compliance code
  
  Refactor the code checking whether a key is compliant into a new
  function and export that.
  
  Signed-off-by: Justus Winter <justus at gnupg.org>
  
  New function checking if a key is valid
  
  A key is valid if all UIDs have at least the validity 'full'.
  
  Signed-off-by: Justus Winter <justus at gnupg.org>
  
  Tweak complianceStringForKey
  
  According to the design spec, a key should only be usable for
  VS-compliant conversations, if it is valid.
  
  Signed-off-by: Justus Winter <justus at gnupg.org>
  
  Separate filter code from method to helper function
  
  In the same way that 'bgColor' uses 'get_color'.  This makes it
  possible to search through two sets of filters.
  
  Signed-off-by: Justus Winter <justus at gnupg.org>
  
  Add and use a second set of key filters
  
  The second set is not part of the model (i.e. it will not be displayed
  in Kleopatras drop down list in the default view), and will only be
  used for styling keys.
  
  Signed-off-by: Justus Winter <justus at gnupg.org>
  
  Add filters for keys that are (not) VS-compliant
  
  Add a filter that selects VS-compliant keys, and two that highlight
  the validity of the keys using a background color.
  
  Signed-off-by: Justus Winter <justus at gnupg.org>
  
  Add and use function providing a short compliance string for keys
  
  Include short compliance information in key lists and combo boxes.
  
  Signed-off-by: Justus Winter <justus at gnupg.org>
  
  Add a field 'Validity' to the key model
  
  Add a new field for the validity of keys, and populate it with
  validity and compliance information.
  
  Signed-off-by: Justus Winter <justus at gnupg.org>
  
  Rework the keyfilter model
  
  Rework the 'data(..)' method, use the filter ids as UserRole, so that
  we can match on them.
  
  Signed-off-by: Justus Winter <justus at gnupg.org>
  
  Add a filter for keys that are not yet certified
  
  And also plug it into the list it if the trust model is "direct".
  
  Signed-off-by: Justus Winter <justus at gnupg.org>
  
  Here arc, butcher this commit...

REPOSITORY
  R90 PIM: Kleo Library

BRANCH
  justus/compliance

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

AFFECTED FILES
  src/kleo/keyfiltermanager.cpp
  src/models/keylistmodel.cpp
  src/models/keylistmodelinterface.h
  src/ui/keyselectioncombo.cpp
  src/utils/formatting.cpp
  src/utils/formatting.h

To: justusw, aheinecke
Cc: #kde_pim, dvasin, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20170705/f72bb1cd/attachment.html>


More information about the kde-pim mailing list