Bug 483079 - KMenuEdit shows deletion dialog when cutting item with submenu
Summary: KMenuEdit shows deletion dialog when cutting item with submenu
Status: RESOLVED FIXED
Alias: None
Product: kmenuedit
Classification: Applications
Component: general (show other bugs)
Version: 6.0.1
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6, usability
Depends on:
Blocks:
 
Reported: 2024-03-10 06:19 UTC by Kenny Hui
Modified: 2024-05-14 17:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 6.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenny Hui 2024-03-10 06:19:54 UTC
SUMMARY
When clicking the "Cut" button in KMenuEdit or pressing Ctrl+X, a deletion dialog appears with the text "All submenus of [Item Name] will be removed. Do you want to continue?", however it is merely a cut action and having this dialog appear may confuse users.

STEPS TO REPRODUCE
1. Open KMenuEdit
2. Select an item with submenu (Usually a category)
3. Press "Cut" or with keyboard shortcut Ctrl+X

OBSERVED RESULT
A deletion dialog will appear, as if you are clicking the "Delete" button instead

EXPECTED RESULT
No dialog should pop up.

SOFTWARE/OS VERSIONS
Linux: Fedora 40
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
The dialog is introduced in https://invent.kde.org/plasma/kmenuedit/-/commit/d9edce9cddc589044d905e8b86b9b585370485e7

A cut operation will call Treeview::Copy with "cutting" parameter set to true, which in turn would also call the TreeView::del function, causing the dialog to appear.
Comment 1 Bug Janitor Service 2024-03-12 15:31:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kmenuedit/-/merge_requests/32
Comment 2 Nate Graham 2024-05-14 17:53:02 UTC
Git commit 4de76d789b347744e2221eea3f9b0ee8a625a20c by Nate Graham, on behalf of Kenny Hui.
Committed on 14/05/2024 at 17:52.
Pushed by ngraham into branch 'master'.

Remove confirmation dialog when cutting or deleting items with children

A confirmation dialog will appear if the selected item that is being cur or 
contains child items. This is unnecessary because changes are not actually
applied until you explicitly save them.
FIXED-IN: 6.1

M  +0    -9    treeview.cpp

https://invent.kde.org/plasma/kmenuedit/-/commit/4de76d789b347744e2221eea3f9b0ee8a625a20c