[PATCH] Re: Missing Clear entry in context menu for lineedit

David Faure faure at kde.org
Tue Oct 23 14:33:41 BST 2007


On Tuesday 23 October 2007, Andras Mantia wrote:
> On Tuesday 23 October 2007, Andras Mantia wrote:
> > Hi,
> >
> >  I was "shocked" to see that in KDE4 it is impossible to clear a
> > lineedit with a single action: Clear entry in the context menu. This
> > is a very useful feature especially on X11, you know, because the
> > mouse selection immediately enters the selection clipboard. I heavily
> > did the following:
> > - select a text
> > - right click on a lineedit, clear the text
> > - paste the previous selection with the middle mouse button
> >
> > Now I have to:
> > - select a text
> > - right click on a lineedit, choose Select All to the text
> > - right click on a lineedit, choose Delete to remove the text
> > - paste the previous selection with the middle mouse button
> >
> > Does this missing from Qt4 already? Anyway, for KLineEdit (and
> > similar classes), I think we should add back this entry.
> 
> Patch attached.

Shouldn't the new code happen -before- the call to    
  KIconTheme::assignIconsToContextMenu( KIconTheme::TextEditor, popup->actions () );
?

The way to locate the selectAllAction based on its translated text feels a bit dirty,
but I suppose there's no other way, what, with actions having no objectName :(

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list