[Kde-pim] Review Request 123109: Fix assert when ETM is monitoring one specific collection.
Christian Mollekopf
chrigi_1 at fastmail.fm
Fri Apr 24 08:25:35 BST 2015
> On April 24, 2015, 7:07 vorm., David Faure wrote:
> > Daniel: is this what you had in mind?
>
> David Faure wrote:
> Err sorry, I mean Christian :-)
I meant:
// If collections are not in the model, there will be no valid index for them.
if ((m_collectionFetchStrategy != EntityTreeModel::InvisibleCollectionFetch) &&
(m_collectionFetchStrategy != EntityTreeModel::FetchNoCollections) &&
!(!m_showRootCollection && collectionId == m_rootCollection.id())) {
const QModelIndex index = indexForCollection(Collection(collectionId));
Q_ASSERT(index.isValid());
//To notify about the changed fetch and population state
emit dataChanged(index, index);
}
as it is in master. That way we don't enter the if in the first place.
- Christian
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123109/#review79422
-----------------------------------------------------------
On März 29, 2015, 12:32 nachm., David Faure wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123109/
> -----------------------------------------------------------
>
> (Updated März 29, 2015, 12:32 nachm.)
>
>
> Review request for KDEPIM-Libraries and Christian Mollekopf.
>
>
> Repository: kdepimlibs
>
>
> Description
> -------
>
> Since 58af6d2ca8194, this sets it as the root of the model.
> So if the collection itself changes, the associated index is the invalid index.
>
> REVIEW: 123109
>
>
> Diffs
> -----
>
> akonadi/entitytreemodel_p.cpp 6800a8659e59b36472380d22968c341913a1a5bb
>
> Diff: https://git.reviewboard.kde.org/r/123109/diff/
>
>
> Testing
> -------
>
> This was asserting, in the test app I'm writing, where the ETM is created with only one specific collection to monitor.
>
>
> Thanks,
>
> David Faure
>
>
_______________________________________________
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