Bug 339161

Summary: "format files" context menu action should ask for confirmation
Product: [Developer tools] kdevplatform Reporter: RJVB <rjvbertin>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED DUPLICATE    
Severity: normal CC: mail
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description RJVB 2014-09-17 23:41:56 UTC
I just hit the "format files" menu item instead of "Find/Replace in this folder", the item just above.
The UI became irresponsive and after restarting KDEvelop I found out that was because it had already reformatted hundreds of project files rather than some less destructive reason. Fortunately I still had the files for which I had no recent backup still open in edit windows, so after killing and restarting KDevelop I could discard the changes the formatter had made.

Reproducible: Always

Steps to Reproduce:
1. right-click on a project
2. click "Format files"


Actual Results:  
formatting starts immediately, without confirmation (nor useful feedback; on OS X I got the "beachball" indicating that events weren't being handled)

Expected Results:  
this action is destructive as it acts not only on open files (that apparently are not saved after modification) but also on the other files of the project. No one is above hitting a neighbouring menu item, so there should at least be the possibility to require confirmation on this (and other actions that cannot be undone).

Observed and "tested" in KDevelop git/kde4-legacy on OS X.

And I've been hesitating to give this "Critical" severity ...
Comment 1 Sven Brauch 2015-10-11 14:57:46 UTC

*** This bug has been marked as a duplicate of bug 343895 ***