Review Request 111776: Update URLs copied to clipboard when they change due to KIO operations

David Faure faure at kde.org
Fri Aug 2 13:53:04 BST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111776/#review36984
-----------------------------------------------------------


Sorry for my slow review which led you to commit meanwhile, but here it comes anyway :)


kio/kio/clipboardupdater.cpp
<http://git.reviewboard.kde.org/r/111776/#comment27281>

    The name sounds like it will clear the clipboard.
    
    removeUrlsFromClipboard would be better



kio/kio/clipboardupdater.cpp
<http://git.reviewboard.kde.org/r/111776/#comment27280>

    indexOf before removeAll is not useful, removeAll will do a full search again anyway.
    
    Either use the result of indexOf, or just call removeAll unconditionnally.



kio/kio/clipboardupdater.cpp
<http://git.reviewboard.kde.org/r/111776/#comment27282>

    extra space before clipboard



kio/kio/copyjob.cpp
<http://git.reviewboard.kde.org/r/111776/#comment27284>

    Where's this instance deleted?
    
    Should there be a deleteLater() in all code paths of slotResult()?



kio/tests/clipboardupdatertest.cpp
<http://git.reviewboard.kde.org/r/111776/#comment27285>

    QVERIFY(a == b) should always be QCOMPARE(a, b) instead, so that the value of "a" can be seen in case of a failure


- David Faure


On Aug. 2, 2013, 12:37 p.m., Dawit Alemayehu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111776/
> -----------------------------------------------------------
> 
> (Updated Aug. 2, 2013, 12:37 p.m.)
> 
> 
> Review request for kdelibs and David Faure.
> 
> 
> Description
> -------
> 
> This patch is an improvement of https://git.reviewboard.kde.org/r/111585/ such that KIO operations also update URLs in the clipboard. As such, all KIO operations that rename, move or delete a file will always update the contents of the clipboard. 
> 
> A couple of notes about this patch:
> 
> - KIO::trash was left out from this patch because I am unsure whether it should be treated like a delete or move operation. 
> - Move, rename and delete operations performed outside of KIO are not covered by this patch and as such will not update URLs in the clipboard. Dealing with non KIO modifications is outside the scope of this patch since it needs to be dealt with outside of KIO.
> 
> 
> This addresses bug 134960.
>     http://bugs.kde.org/show_bug.cgi?id=134960
> 
> 
> Diffs
> -----
> 
>   kio/kio/clipboardupdater.cpp 8ab9210 
>   kio/kio/clipboardupdater_p.h b07c320 
>   kio/kio/copyjob.cpp da19de5 
>   kio/kio/deletejob.cpp 7178424 
>   kio/kio/job.cpp 05d0ba2 
>   kio/kio/paste.cpp b4372ab 
>   kio/tests/CMakeLists.txt b570aac 
>   kio/tests/clipboardupdatertest.h PRE-CREATION 
>   kio/tests/clipboardupdatertest.cpp PRE-CREATION 
>   kio/tests/fileundomanagertest.h e909bb7 
>   kio/tests/fileundomanagertest.cpp 709938d 
> 
> Diff: http://git.reviewboard.kde.org/r/111776/diff/
> 
> 
> Testing
> -------
> 
> Unite tests.
> 
> 
> Thanks,
> 
> Dawit Alemayehu
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130802/f4d9077c/attachment.htm>


More information about the kde-core-devel mailing list