[Kde-pim] ItemViews help? Modeltest fails when used with proxymodel.

Stephen Kelly steveire at gmail.com
Sun Dec 7 16:16:24 GMT 2008


Hi,

In Akonadi, we have a CollectionModel which shows the collections known to
akonadi.

It passes modeltest on its own, but when using a proxymodel and testing the
proxy, modeltest fails.

I forked collection model and added some debug output in
playground/pim/kjotsrewrite.

It looks like by the time ModelTest::rowsAboutToBeInserted is called on the
*proxymodel*, the rows are already in the model, so the count checking done
in ModelTest fails.

It looks like it might be a race condition or something, but I don't know if
it's a bug in QSortFilterProxyModel, ModelTest, or CollectionModel. I also
used QThread::currentThreadId to see that all are running in the same
thread.

I tried to also emit layoutAboutToBeChanged and layoutChanged before
inserting items into the model, but that didn't change anything.

Does anyone know more about itemviews and able to help with this?

Steve.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: modeltestnoproxy
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20081207/892c9432/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: modeltestwithproxy
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20081207/892c9432/attachment-0001.ksh>
-------------- next part --------------
_______________________________________________
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