[kdepimlibs] [Bug 329004] New: EntityOrderProxyModel emits layoutChanged on every dataChanged signal

Christian Mollekopf mollekopf at kolabsys.com
Thu Dec 19 15:22:51 GMT 2013


https://bugs.kde.org/show_bug.cgi?id=329004

            Bug ID: 329004
           Summary: EntityOrderProxyModel emits layoutChanged on every
                    dataChanged signal
    Classification: Unclassified
           Product: kdepimlibs
           Version: GIT (master)
          Platform: unspecified
                OS: Linux
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: akonadi
          Assignee: kdepim-bugs at kde.org
          Reporter: mollekopf at kolabsys.com

This is actually a problem of QSortFilterProxyModel with dynamic sorting. The
QSortFilterProxyModel just unconditionally resorts and emits layoutChanged on
every dataChanged signal it receives in order to react to changes that would
affect sorting.

This however causes all following models to have to redo their internal mapping
and in particular it causes the selection in the FolderTreeWidget of kmail to
be cleared. Since we use KSelectionProxymodels to set the messagelist based on
the selection in the FolderTreeWidget (and we also use the selection to
reference collections in the ETM), the layoutChanged signals are probably
rather expensive.

Especially since the ETM emits a dataChanged signal for every collection fetch
(for status updates), that is then everytime translated to a layoutChanged by
the EntityCollectionOrderProxyModel (which is a EntityOrderProxyModel) in
kmail.

We should either fix QSortFilterProxyModel to first check if it actually
requires resorting before emitting layoutChanged, or work around the problem in
EntityOrderProxyModel (and possibly other similar proxymodels).

Reproducible: Always

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list