D13145: Check if destination exists also when pasting binary data
Elvis Angelaccio
noreply at phabricator.kde.org
Sun May 27 11:01:51 UTC 2018
elvisangelaccio created this revision.
elvisangelaccio added a reviewer: dfaure.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: kde-frameworks-devel.
elvisangelaccio requested review of this revision.
REVISION SUMMARY
Currently we check whether the destination URL exists only if we are
pasting text (or if the mimedata has only one format).
If we are pasting e.g. images copied from Spectacle, we unconditionally
overwrite the destination URL.
This patch moves the StatJob+RenameDialog from `getNewFileName()` to a
new `getDestinationUrl()` function, which we can also call from `chooseFormatAndUrl()`.
BUG: 394318
FIXED-IN: 5.47
TEST PLAN
- Paste some image into an existing file and check the rename dialog.
- Check that pasting text still shows the rename dialog.
REPOSITORY
R241 KIO
BRANCH
fix-image-pasting (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D13145
AFFECTED FILES
src/widgets/paste.cpp
To: elvisangelaccio, dfaure
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180527/53eef867/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list