Skip to content
Commit 1c9e01b2 authored by Harald Sitter's avatar Harald Sitter 🐧 Committed by Nicolas Fella
Browse files

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

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
(cherry picked from commit 79070f06)
parent 87309eff
Pipeline #612732 passed with stage
in 12 minutes and 16 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment