Review Request 123414: Duplicate RecentDocuments entry if two different files have the same name.

David Faure faure at kde.org
Sat Apr 25 20:06:36 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123414/#review79511
-----------------------------------------------------------


You're quite right about "quite a long time". Looking at git log -p on the kdelibs4 file, it appears that I broke this in 2002 (commit 1e57eeccd7). Wow :-)


I think the point about "two different apps = two entries" is so that you can click on the item in the K menu and get it started again with the application that added it there. If you merge the apps, then you can't choose which app to start again. Disclaimer: I have no idea if this matches the current GUI for this.


src/core/krecentdocument.cpp (line 124)
<https://git.reviewboard.kde.org/r/123414/#comment54324>

    You should use the exact same code as the other part of this file which reads the URL key:
    
    tmp.desktopGroup().readPathEntry("URL", QString())
    
    And this should be compared with url.toDisplayString(), not url.toString(), to match what gets written into the file (see the variable "openStr" in ::add()).


- David Faure


On April 18, 2015, 11:21 a.m., Anthony Vital wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123414/
> -----------------------------------------------------------
> 
> (Updated April 18, 2015, 11:21 a.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> Apparently this hasn't been working for a long time.
> 
> Also, the code seems to duplicate an entry on purpose if a file was opened twice but with two different applications. I don't understand why this is desirable. Wouldn't it be better if the old entry was just updated?
> 
> 
> Diffs
> -----
> 
>   src/core/krecentdocument.cpp d95733d804a766cd740540d3db9cff2cb94bf140 
> 
> Diff: https://git.reviewboard.kde.org/r/123414/diff/
> 
> 
> Testing
> -------
> 
> Created two files with the same name but in different places, opened them. Two entries with different URLs are created.
> 
> 
> Thanks,
> 
> Anthony Vital
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150425/8a4fffa7/attachment.html>


More information about the Kde-frameworks-devel mailing list