[Kde-pim] [Differential] [Request, 699 lines] D2068: Port StatisticsProxyModel to KExtraColumnsProxyModel.

dfaure (David Faure) noreply at phabricator.kde.org
Sun Jul 3 13:29:41 BST 2016


dfaure created this revision.
dfaure added a reviewer: dvratil.
dfaure added a subscriber: KDE PIM.
Restricted Application added a project: KDE PIM.
Restricted Application added a subscriber: kde-pim.

REVISION SUMMARY
  - this fixes sibling() - the unittest confirmed Dan's assessment that
  
  sibling() got broken for StatisticsProxyModel with Qt5.
  And this finally repairs the browser tab in akonadiconsole, clicking
  on a folder lists its contents.
  
  - this reduces the number of dataChanged signals emitted by the proxy:
  
  instead of dataChanged((row,0) (row,0)) + dataChanged((row,1) (row,3))
  the proxy now emits dataChanged((row,0) (row,3)) directly
  
  - I also removed the code emitting dataChanged for parent indexes,
  
  the reasoning was "so that cumulative totals can be updated", but there
  are no cumulative totals anywhere in this proxy (other than the tooltip),
  although I now see that the delegate is where cumulative totals happen...
  
  - the awful model-index-struct-casting hack is no longer necessary,
  
  the code is much simpler, there are now unittests (both here and for
  the base class KExtraColumnsProxyModel in kitemmodels)...

TEST PLAN
  unittest + akonadiconsole + kmail
  Deleting a mail in akonadiconsole updates the total in the closed parent
  folder in kmail's foldertree. So that still works.
  I wonder if I'm missing a case where the delegate needs the proxy to
  emit dataChanged for parents so that they are refreshed correctly, though.

REPOSITORY
  rAKONADI Akonadi

BRANCH
  master

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

AFFECTED FILES
  autotests/libs/CMakeLists.txt
  autotests/libs/statisticsproxymodeltest.cpp
  autotests/libs/test_model_helpers.h
  src/core/models/statisticsproxymodel.cpp
  src/core/models/statisticsproxymodel.h

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

To: dfaure, dvratil
Cc: kde-pim, #kde_pim, dvasin, winterz, smartins, vkrause, mlaurent, knauss, dvratil
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list