[Kde-pim] Review Request: akonadi: make itemsFromModel() support treemodels
Sebastian Sauer
sebsauer at kdab.com
Thu Jan 28 12:09:34 GMT 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2747/#review3928
-----------------------------------------------------------
trunk/KDE/kdepim/korganizer/interfaces/korganizer/baseview.cpp
<http://reviewboard.kde.org/r/2747/#comment3316>
I wonder a bit about the new QModelIndex() here... Are we sure that the dataChanged is only called for the first levels of items? So, something like;
Q_ASSERT(topLeft.parent() == QModelIndex() && bottomRight.parent() == QModelIndex());
would not assert? If yes, then we should probably add that assert. Well, can't harm and makes it a bit more clear. If it asserts, then we do call itemsFromModel with the wrong parent and things will go wrong, or?
- Sebastian
On 2010-01-28 02:36:55, Sergio Martins wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/2747/
> -----------------------------------------------------------
>
> (Updated 2010-01-28 02:36:55)
>
>
> Review request for KDE PIM, Frank Osterfeld and Sebastian Sauer.
>
>
> Summary
> -------
>
> korganizer is crashing when adding and editing incidences, this happens because currently itemsFromModel() (utils.cpp) only supports models were items don't have parents.
>
> I've added support for parents and now QAbstractItemModel::rowsInserted(QModelIndex parent,int, start int end) signal is properly interpreted.
>
>
> This addresses bug 223729.
> https://bugs.kde.org/show_bug.cgi?id=223729
>
>
> Diffs
> -----
>
> trunk/KDE/kdepim/akonadi/kcal/calendar.cpp 1080580
> trunk/KDE/kdepim/akonadi/kcal/utils.h 1080580
> trunk/KDE/kdepim/akonadi/kcal/utils.cpp 1080580
> trunk/KDE/kdepim/korganizer/interfaces/korganizer/baseview.cpp 1081262
>
> Diff: http://reviewboard.kde.org/r/2747/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Sergio
>
>
_______________________________________________
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