Skip to content

kcms/plasmasearch: don't crash on dragging favorties to the end

Harald Sitter requested to merge work/sitter/searchcrash into master

snap it back to the end instead.

this happens because the pluginselector doodad is a singular list view with sections. when the user drags an item from the favorites section to the available section, to reorder an item at the bottom, the new drop index is inside the model but not inside the m_favoriteMetaDataList. i.e. its index is model-bound not m_favoriteMetaDataList-bound. we therefore need to clamp the index at the upper bounds of m_favoriteMetaDataList manually so as to not work with invalid indexes

BUG: 481594

Merge request reports

Loading