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