D16051: Fix KOrg category color customization crash
    Denis Kurz 
    noreply at phabricator.kde.org
       
    Mon Oct  8 21:08:49 BST 2018
    
    
  
dkurz created this revision.
dkurz added a reviewer: KDE PIM.
Herald added a project: KDE PIM.
Herald added a subscriber: kde-pim.
dkurz requested review of this revision.
REVISION SUMMARY
  Use default value for NULL columns.
  
  Without this patch, possibly different default values are used for
  entity construction (default from akonadidb.xml) and when reading a row
  from the database (default-constructed), resulting in inconsistencies.
  For example, when modifying a Tag, the resulting Tag modify notification
  indicates that the new parentId of the modified Tag is 0
  (default-constructed qint64), whereas Tags without parents are
  initialized with parentId -1. This patch fixes these inconsistencies by
  considering the "default" value from akonadidb.xml for row-to-entity
  conversion, too.
  
  Set default Tag::parentId to -1.
  
  A parentless Tag is initialized with parentId -1, so we should also
  report that when reading a Tag from the database where the parentId
  field is NULL.
  
  BUG: 398459
  FIXED-IN: 5.9.3
TEST PLAN
  KOrganizer stops crashing on category color customization
  with this patch. More detailed test plan suggestions welcome.
REPOSITORY
  R165 Akonadi
BRANCH
  hotfix/fix-crash-on-tag-modification
REVISION DETAIL
  https://phabricator.kde.org/D16051
AFFECTED FILES
  src/server/storage/akonadidb.xml
  src/server/storage/entities.xsl
To: dkurz, #kde_pim
Cc: kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20181008/9095f01e/attachment.html>
    
    
More information about the kde-pim
mailing list