anthonyfieroni added inline comments. INLINE COMMENTS
> anthonyfieroni wrote in datamodel.cpp:379 > Optimization is you have [5, 6, 8] then [5, 6, 8, 9] so it make only > beginInsertRows({}, 3, 3); > full replace (m_items[sourceName] = list.toVector();) > endInsertRows() > Same if you [5, 6] > beginRemoveRows > full replace (m_items[sourceName] = list.toVector();) > endRemoveRows > > It does not touch either m_roleNames size, which are changed. > > I try to remove all first, then re-add with m_roleNames changes. The worst case is when you have different values [5, 6, 8] and [5, 8, 9, 10] it will add only 10 and internally replace other, is QML model expect that? So why i first make full remove, then full insert. REPOSITORY R242 Plasma Framework (Library) REVISION DETAIL https://phabricator.kde.org/D18249 To: anthonyfieroni, davidedmundson, broulik, ngraham, mart, #plasma Cc: kde-frameworks-devel, michaelh, ngraham, bruns