Skip to content
  • Elvis Angelaccio's avatar
    Check if destination exists also when pasting binary data · b73355da
    Elvis Angelaccio authored
    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.
    
    Reviewers: dfaure
    
    Subscribers: kde-frameworks-devel
    
    Tags: #frameworks
    
    Differential Revision: https://phabricator.kde.org/D13145
    b73355da