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

Andras Mantia amantia at kde.org
Tue Oct 23 15:56:03 BST 2007


On Tuesday 23 October 2007, David Faure wrote:
> 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 () ); ?

Actually I don't know, but you are probably right (still there is 
addition to the menu later, when the completion submenu is added in the 
KLineEdit case and some spell-checking related actions in the KTextEdit 
case. So I don't know what's the better solution.

> 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 :(

Yes, unfortunately I couldn't find a better way to locate the place of 
the selectAllAction. 

Andras

-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071023/bc7db890/attachment.sig>


More information about the kde-core-devel mailing list