]> cloud.milkyroute.net Git - dolphin.git/commit
Don't include `iconOverlays` in rolesData if it is empty
authorKai Uwe Broulik <kde@privat.broulik.de>
Mon, 15 Aug 2022 13:02:13 +0000 (15:02 +0200)
committerKai Uwe Broulik <kde@privat.broulik.de>
Mon, 15 Aug 2022 13:02:13 +0000 (15:02 +0200)
commitfac08af081467a798a649cde6f8ca615e797c137
tree40ef9d3c824e62e1840e917b55639c14aa925c53
parentf45d2e985422a0ca96098155a20d32ec4783e5fa
Don't include `iconOverlays` in rolesData if it is empty

If this role isn't in the model yet, it would be `QVariant::Invalid`
which is obviously a distinct type from an empty string list.

This means `KFileItemModel::setData` treats them non-equal and
potentially does expensive operations on the model, which is
called every time a role is resolved in `KFileItemModelRolesUpdater`.

With this change, the number of pointless layout calculations is
significantly reduced.
src/kitemviews/kfileitemmodelrolesupdater.cpp