Bug 360666 - over write dialog is not shown when saving a file with preexisting file name. the file gets overwritten without alerting and data of existing file is lost
Summary: over write dialog is not shown when saving a file with preexisting file name....
Status: RESOLVED FIXED
Alias: None
Product: frameworks-frameworkintegration
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.22.0
Platform: Other Linux
: NOR critical
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 357863 381880 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-03-17 15:29 UTC by Raghavendra kamath
Modified: 2018-06-16 10:13 UTC (History)
8 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raghavendra kamath 2016-03-17 15:29:10 UTC
over write dialog is not shown when saving a file with preexisting file name. the file gets overwritten without alerting and data of existing file is lost.

If you have by mistakenly clicked an existing file or have the same name as a existing file krita won't alert you for over write confirmation, instead it will just over write the file.

this happens with both save and save as.

Also to note is that this doesn't happen on windows or osx
scottyp on IRC checked it and it behaved normally.
Boud and I on linux, have encountered this bug

Reproducible: Always

Steps to Reproduce:
1.Open krita and create a new document, then save this document as test.kra at some location
2.Open a new document then hit ctrl + s to open the save dialog
3.Go to the destination of test.kra and click it , then hit save

Actual Results:  
the new file is saved by overwriting the first file (test.kra) without user consent

Expected Results:  
a over write confirmation dialog should be prompted to user before over writing anything
Comment 1 Raghavendra kamath 2016-03-17 15:30:10 UTC
marking this confirmed as boud has confirmed it on IRC
Comment 2 Halla Rempt 2016-03-20 10:27:51 UTC
Hm... I get the warning under gnome... Let me check KDE next.
Comment 3 Halla Rempt 2016-03-20 11:14:03 UTC
Yes, looks like this is a specific issue with the plasma desktop integration :-(
Comment 4 Halla Rempt 2016-05-14 09:11:34 UTC
Hi,

Can you still reproduce this? With my current build on plasma5, I get the warning dialog.
Comment 5 Raghavendra kamath 2016-05-14 09:38:25 UTC
No I still don't get a warning 

I am on latest plasma in arch linux
Comment 6 Quiralta 2016-05-14 23:26:15 UTC
Right now I can reproduce this bug too on my system, fresh build of Krita, also on Archlinux with Plasma5.6.4 Qt 5.6
Comment 7 Jonathan Marten 2016-05-17 10:44:20 UTC
Confirmed with current Plasma 5 and Konsole.  Its "Save Output As..." function, which uses a simple QFileDialog:

    QFileDialog* dialog = new QFileDialog(QApplication::activeWindow(),
            QString(),
            QDir::homePath());
    dialog->setAcceptMode(QFileDialog::AcceptSave);

will overwrite any existing file without prompting.
Comment 8 Halla Rempt 2016-05-17 12:43:08 UTC
Okay, so this _is_ is a kf5 bug, not a krita bug.
Comment 9 Jonathan Marten 2016-05-17 13:29:58 UTC
https://git.reviewboard.kde.org/r/127944/
Comment 10 Christoph Feck 2016-05-30 03:13:16 UTC
*** Bug 357863 has been marked as a duplicate of this bug. ***
Comment 11 Jonathan Marten 2016-06-05 14:52:41 UTC
Git commit 226401862f2c68f9bd37e95f6fae241b2d41e733 by Jonathan Marten.
Committed on 05/06/2016 at 14:51.
Pushed by marten into branch 'master'.

Set KFileDialog overwrite option for saving to follow the Qt option

Also updated test utility and autotests accordingly.

REVIEW:127944

M  +69   -0    autotests/kfiledialog_unittest.cpp
M  +2    -0    src/platformtheme/kdeplatformfiledialoghelper.cpp
M  +10   -0    tests/qfiledialogtest.cpp

http://commits.kde.org/plasma-integration/226401862f2c68f9bd37e95f6fae241b2d41e733
Comment 12 Jonathan Marten 2016-06-05 14:55:27 UTC
Git commit 31ead90605238dfc67c3dac0eb9fd9fd7d072051 by Jonathan Marten.
Committed on 05/06/2016 at 14:54.
Pushed by marten into branch 'Plasma/5.6'.

Set KFileDialog overwrite option for saving to follow the Qt option

Also updated test utility and autotests accordingly.

REVIEW:127944

M  +69   -0    autotests/kfiledialog_unittest.cpp
M  +2    -0    src/platformtheme/kdeplatformfiledialoghelper.cpp
M  +10   -0    tests/qfiledialogtest.cpp

http://commits.kde.org/plasma-integration/31ead90605238dfc67c3dac0eb9fd9fd7d072051
Comment 13 Raghavendra kamath 2017-07-09 13:20:14 UTC
This bug has reappeared in 5.10.3, I can reproduce it in both kate and krita, 

let me know if this needs a new bug report.
Comment 14 Halla Rempt 2017-11-21 10:48:37 UTC
*** Bug 381880 has been marked as a duplicate of this bug. ***
Comment 15 Patrick Silva 2018-04-23 02:28:34 UTC
cannot reproduce with krita nor kate on Arch Linux, frameworks 5.45.
Comment 16 Raghavendra kamath 2018-06-16 10:13:05 UTC
this seems to have been fixed in recent updates.

thank you closing this now