Bug 385492 - Dolphin and KIO confirmation settings are not in sync
Summary: Dolphin and KIO confirmation settings are not in sync
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-08 13:41 UTC by Алексей Шилин
Modified: 2018-07-09 10:36 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.48


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Алексей Шилин 2017-10-08 13:41:01 UTC
Hi,

There is a 'ConfirmTrash' configuration option which has different default values in Dolphin and in KIO: the former defaults to asking for confirmation when items are moved to trash, while the latter defaults to the opposite [1]. This leads to a weird behavior when the corresponding configuration file doesn't exist (i.e. when user hasn't modified any of these settings yet): Dolphin has its 'Ask for confirmation when: Moving files or folders to trash' option unchecked, but actually *does* ask for confirmation (and other applications like Gwenview etc., too); however, after user modifies a completely unrelated Dolphin setting (disables the Trash size limit, for example), this behavior unexpectedly changes to no confirmation (because Dolphin creates the configuration file with its own defaults).

 [1] https://github.com/KDE/kio/blob/master/src/widgets/jobuidelegate.cpp#L203
Comment 1 Алексей Шилин 2017-10-08 20:21:04 UTC
(In reply to Алексей Шилин from comment #0)
> There is a 'ConfirmTrash' configuration option which has different default
> values in Dolphin and in KIO: the former defaults to asking for confirmation
> when items are moved to trash, while the latter defaults to the opposite

There is a typo: it should have been 'the former defaults to *not* asking for confirmation when items are moved to trash, while the latter defaults to the opposite'.
Comment 2 Julian Steinmann 2018-06-15 19:26:00 UTC
Hey, and thanks for your detailed report! I can still reproduce this behavior with Dolphin 18.04.2, so the underlying issue still exists. There are IMO now two possible ways to deal with this: 
1. Modify the default setting of KIO to be false. This is not very good from a new user standpoint because they might accidentally delete files without being aware of it or having consented to not showing the message.
2. Create the Dolphin config file at first startup. This sounds rather reasonable, but there might be technical problems with this solution that I am not aware of.

Anyways, you've already done some great research! If you would like to go ahead and create a patch for this, we'd all be grateful :)
Comment 3 Алексей Шилин 2018-07-09 10:36:11 UTC
Git commit 7d15dad5e427132758db178e45a6e4b7b5daeb0f by Алексей Шилин.
Committed on 09/07/2018 at 10:35.
Pushed by aleksejshilin into branch 'master'.

Don't show confirmation dialog for Trash action by default

Summary:
Dolphin and KIO default confirmation settings were not in sync: the former
defaults to not showing the dialog while the latter used to default to the
opposite.

This change resolves the inconsistency by adjusting KIO defaults.
FIXED-IN: 5.48

Test Plan:
  1. Create a new user account and log into it.
  2. Open Dolphin.
  3. Create a text file and hit Del. The confirmation dialog should *not*
     appear.
  4. Check that permanent deletion (Shift+Del) and emptying the Trash still
     show the confirmation dialog.

Reviewers: dfaure, #frameworks, #dolphin, ngraham

Reviewed By: dfaure, #dolphin, ngraham

Subscribers: ngraham, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D13921

M  +6    -3    src/widgets/jobuidelegate.cpp

https://commits.kde.org/kio/7d15dad5e427132758db178e45a6e4b7b5daeb0f