[PATCH] KLineEdit websearch feature

Thomas Lübking thomas.luebking at web.de
Fri May 29 15:59:03 BST 2009


The mail entered my inbox /today/ and i couldn't find an entry in the kcd 
archive, so comments after a rough scan:

1. i guess implementing classes in a header is an absolute no-go :-(

2. addMenu() does not transfer onership, i.e. w/o actually seeing the patch 
applied i just assume your websearch popup doesn't get deleted anywhere, but 
probably created on each rmb -> leaks?!

3. QActions can query a QVariant data, so by binding the menu's 
truggered(QAction*) signal to your slot and (in case you need/want to get 
really sure) asking for sender() you can probably omit the SearchAction

4. though using blanks and brackets in klineedit.cpp seems to be not entirely 
consistent, there's certainly a blank between a keyword (if, for) and the 
opening bracket

Thomas


Am Saturday 23 May 2009 schrieb Sebastian Tilsch:
> Hello,
> this is my first attempt in developing for the KDE project ( except my own
> programs). I added a small but useful feature, that I would like to see in
> most of the components, where text is selectable.
> It expands the context menu of a KLineEdit with the feature "search in
> web...". It uses the current user configuration of Search Providers, which
> is accessible with "kcmshell4 ebrowsing", but it will only use the user
> chosen favorite ones.
> It would be even more useful in other components, like the KRichTextEdit,
> KRichTextWidget, selectable Labels (unfortunately all applications use the
> native QLabel) and in programs, like konsole and konqueror.
> I know from the KDE4.3 release Schedule that adding features for this
> release is over, but maybe, if someone else has the opinion too, this handy
> little feature could be useful, we could still integrate it. Than I would
> also go on, adding it to the other components, as mentioned before.
> I hope the position of the extra classes in "klineedit_p.h" is correct (of
> course, only as long as it is not used by other control-elements).
> The patch I attached modifies klineedit_p.h and klineedit.cpp


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


More information about the kde-core-devel mailing list