[Differential] [Updated, 51 lines] D2423: Set initial categories for non-cached incidences

dkurz (Denis Kurz) noreply at phabricator.kde.org
Sat Aug 13 12:25:13 BST 2016


dkurz updated this revision to Diff 5889.
dkurz added a comment.


  I tried to implement all of knauss' remarks, but I encountered a race condition problem:
  
  I connected the CreateTagJob's result with my own onMissingCategoryCreated, extracted the new tag there, added it to the selected tags and set the selected tags of the TagWidget. This approach makes editting of selected tags work: When I click on the "..." button, all the tags are there, and the correct ones are selected. The text field next to the "..." button, however, is not updated correctly, because the TagWidget's TagModel gets notified *after* I update its selected tags. TagWidget, however, only displays names of tags that are already in the model.
  
  Instead, I chose to add the newly created tags directly to the selected tags (without waiting for akonadi to tell me that the creation succeeded). This has the positive effects of the approach above, and allows us to fix the race condition in TagWidget itself, see https://phabricator.kde.org/D2433

REPOSITORY
  rINCIDENCEEDITOR PIM: Incidence Editor

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D2423?vs=5872&id=5889

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

AFFECTED FILES
  src/incidencecategories.cpp
  src/incidencecategories.h

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: dkurz, #kde_pim
Cc: knauss, kde-pim, spencerb, dvasin, winterz, smartins, vkrause, mlaurent, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20160813/9d88f3dd/attachment.html>


More information about the kde-pim mailing list