<table><tr><td style="">elvisangelaccio created this revision.<br />elvisangelaccio added a reviewer: dfaure.<br />Restricted Application added a project: Frameworks.<br />Restricted Application added a subscriber: kde-frameworks-devel.<br />elvisangelaccio requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D13145">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Currently we check whether the destination URL exists only if we are<br />
pasting text (or if the mimedata has only one format).</p>

<p>If we are pasting e.g. images copied from Spectacle, we unconditionally<br />
overwrite the destination URL.</p>

<p>This patch moves the StatJob+RenameDialog from <tt style="background: #ebebeb; font-size: 13px;">getNewFileName()</tt> to a<br />
new <tt style="background: #ebebeb; font-size: 13px;">getDestinationUrl()</tt> function, which we can also call from <tt style="background: #ebebeb; font-size: 13px;">chooseFormatAndUrl()</tt>.</p>

<p>BUG: 394318<br />
FIXED-IN: 5.47</p></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">Paste some image into an existing file and check the rename dialog.</li>
<li class="remarkup-list-item">Check that pasting text still shows the rename dialog.</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>BRANCH</strong><div><div>fix-image-pasting (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D13145">https://phabricator.kde.org/D13145</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/widgets/paste.cpp</div></div></div><br /><div><strong>To: </strong>elvisangelaccio, dfaure<br /><strong>Cc: </strong>kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>