Bug 357684

Summary: kfiledialog's getsavefilename defaults to no overwrite confirmation, unlike qfiledialog
Product: [Applications] kdialog Reporter: Antony Lee <anntzer.lee>
Component: generalAssignee: Brad Hards <bradh>
Status: RESOLVED FIXED    
Severity: normal CC: DanielSabo, justin.zobel
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Antony Lee 2016-01-08 03:37:46 UTC
QFileDialog's getSaveFileName defaults to asking the user for confirmation when an existing file is selected (as it will likely be overwritten)... except when it delegates to the KDE5's native dialog, which defaults to no confirmation asked.

Reproducible: Always

Steps to Reproduce:
1. check that `kfiledialog --getsavefilename .` or `python -c 'from PyQt5.QtWidgets import *; app = QApplication([]); QFileDialog.getSaveFileName()'` don't ask the user for confirmation when an existing file is selected.
2. check that `python -c 'from PyQt5.QtWidgets import *; app = QApplication([]); QFileDialog.getSaveFileName(options=QFileDialog.DontUseNativeDialog)'` DOES prompt the user for confirmation in such a case.

Actual Results:  
(see above)

Expected Results:  
KFileDialog should prompt for confirmation when the user selects a file for overwriting.

I believe that under KDE4, confirmation was on by default.
Comment 1 Daniel Sabo 2016-01-24 03:25:06 UTC
I submitted a patch for this issue to phabricator but I don’t know if/when it will be merged:

https://phabricator.kde.org/D807
Comment 2 Justin Zobel 2020-11-08 07:45:27 UTC
aacid reported on the phab commit that "As far as i can see this was never commited and now does not apply anymore."

Can you please confirm this is no longer an issue so we can either resolve or further investigate this patch, thanks.
Comment 3 Antony Lee 2020-11-08 11:24:36 UTC
This is no longer an issue AFAICS.
Comment 4 Justin Zobel 2020-11-09 01:12:56 UTC
Thanks for the feedback Antony, I'll marked this as resolved but feel free to open a new bug report if the issue returns.