[dolphin] [Bug 450813] "Dolphin" crashes when dragging a file to the top of the Places-Panel
https://bugs.kde.org/show_bug.cgi?id=450813 snx changed: What|Removed |Added Status|ASSIGNED|RESOLVED Latest Commit||https://invent.kde.org/fram ||eworks/kio/commit/386629579 ||4d9201c4b4269e0cd5006ed01d6 ||b8af Resolution|--- |FIXED --- Comment #4 from snx --- Git commit 3866295794d9201c4b4269e0cd5006ed01d6b8af by snooxx 💤. Committed on 02/03/2022 at 17:21. Pushed by broulik into branch 'master'. KFilePlacesView: Fix crash when dragging over topmost section header b5de820a78 fixed incorrect highlighting of the section header label during drag operations over the first place of a section in clients setting `m_dropOnPlace`, e.g. Dolphin. This was effective for all except the topmost section header, where it would cause a crash (independent of the state of `m_dropOnPlace`). In `KFilePlacesViewDelegate::previousVisibleIndex` access to `model` fails, because the `index` determined via `indexAt` of `m_dropRect` in `KFilePlacesView::paintEvent` is invalid when dragging towards the topmost section header label. This is because `m_dropRect.topLeft()` can extend above the entry's `visualRect`, i.e. it covers the places items below as well as above the separator, of which the latter does not exist for the first entry. By remembering the index belonging to `m_dropRect` in `m_dropIndex` instead of reconstructing it, we can guarantee it to be valid. Related: bug 450966 Test Plan: No more crash when dragging places or folders over topmost section header label in places view in `kdialog --getsaveurl` as well as `dolphin`. Other functionality related to dragging places around (including existing bugs) is unaffected and the behavior of the original fix remains. M +7-5src/filewidgets/kfileplacesview.cpp https://invent.kde.org/frameworks/kio/commit/3866295794d9201c4b4269e0cd5006ed01d6b8af -- You are receiving this mail because: You are watching all bug changes.
[dolphin] [Bug 450813] "Dolphin" crashes when dragging a file to the top of the Places-Panel
https://bugs.kde.org/show_bug.cgi?id=450813 --- Comment #3 from snx --- Git commit fc95fed526f59b70ea93c5e81680ffd0dec05c61 by snooxx 💤. Committed on 03/03/2022 at 09:06. Pushed by broulik into branch 'master'. KFilePlacesView: Fix potential crash in `previousVisibleIndex` The previous commit fixed a crash in `KFilePlacesViewDelegate::previousVisibleIndex`, where access to `model` failed due to an invalid index. In addition to the previous commit already fixing the crash, unrelated potential crashes in the future can be avoided by checking for an invalid `index` in `previousVisibleIndex`. The existing logic of `indexIsSectionHeader` is kept intact, since now an invalid `index` will lead to comparing two empty strings, i.e. it will not be considered a section header as required by the rest of the code. This fix alone would already solve the crash without any side effects, still introducing `m_dropIndex` seemed less brittle. Related: bug 450966 Test Plan: Functionality related to dragging places around (including existing bugs) is unaffected. M +1-1src/filewidgets/kfileplacesview.cpp https://invent.kde.org/frameworks/kio/commit/fc95fed526f59b70ea93c5e81680ffd0dec05c61 -- You are receiving this mail because: You are watching all bug changes.
[dolphin] [Bug 450813] "Dolphin" crashes when dragging a file to the top of the Places-Panel
https://bugs.kde.org/show_bug.cgi?id=450813 --- Comment #2 from Bug Janitor Service --- A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/779 -- You are receiving this mail because: You are watching all bug changes.
[dolphin] [Bug 450813] "Dolphin" crashes when dragging a file to the top of the Places-Panel
https://bugs.kde.org/show_bug.cgi?id=450813 Bug Janitor Service changed: What|Removed |Added Ever confirmed|0 |1 Status|REPORTED|ASSIGNED --- Comment #1 from Bug Janitor Service --- A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/779 -- You are receiving this mail because: You are watching all bug changes.