KRecentFilesAction broken
Clarence Dang
dang at kde.org
Tue Jul 25 02:16:46 BST 2006
On Monday 24 July 2006 06:19, Albert Astals Cid wrote:
> the problem is
> KRecentFilesAction::addUrl when adding an url that is already there.
[...]
> in that particular piece of code if the url is already there it is removed
> and added again. The problem is that when remoing it, the url you get as
> parameter becomes invalid and so it crashes.
>
> Attached is a simple solution that has the problem of not making the
> already there url "climb" to the first position. Anyone thinks is there a
> better solution
I haven't tested but isn't an easy fix (that should also maintain the
"climb")?
- delete removeAction(action)
+ removeAction(action)
KSelectAction::removeAction() already deletes safely (most of the time)
> Another problem i find is that KRecentFilesAction uses kselectaction that
> creates the menu with radio items, i don't think it's good to have it that
> way. Do you agree it should be changed back to using "normal" menu entries?
Well, I think even KDE 3.4 uses KSelectAction (only it's rendered using ticks
instead of radio/circles). Having said that, I don't think it's accurate to
mark a file that gets opened as selected because the user is likely to modify
the document straight away so the file is not conceptually "selected"
anymore. There were also bugs with the 3.4 implementation related to
selectedness that I still can't reproduce consistently. So, I would vote for
"normal" menu entries too.
More information about the kde-core-devel
mailing list