davidedmundson added inline comments. INLINE COMMENTS
> datamodel.cpp:55-61 > + const QHash<int, QByteArray> roles = sourceModel()->roleNames(); > + m_roleIds.reserve(roles.count()); > + for (auto i = roles.constBegin(); i != roles.constEnd(); ++i) { > m_roleIds[QString::fromUtf8(i.value())] = i.key(); > } > > + setRoleNames(roles); This part, ship it! but I don't think it'll make a huge difference to anything > datamodel.cpp:77 > > + beginResetModel(); > + This shouldn't be needed setSourceModel will will do a reset internally > datamodel.cpp:379 > + > + if (oldLength > 0) { > + beginRemoveRows(QModelIndex(), sourceIndex, sourceIndex + oldLength > - 1); I don't understand what you're changing here, can you provide a bit more detail on the exact problem. > datamodel.cpp:444 > beginRemoveRows(QModelIndex(), sourceIndex, sourceIndex + > count - 1); > - } > - m_items.remove(sourceName); > - if (count > 0) { > + m_items.remove(sourceName); > endRemoveRows(); this isn't equivalent. I could have an entry with an empty count Now this gets left behind 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