Use lxr.kde.org (Re: KAction: kill all convenience methods)

Jos van den Oever jvdoever at gmail.com
Mon Dec 11 16:56:19 GMT 2006


2006/12/11, Friedrich W. H. Kossebau <friedrich.w.h at kossebau.de>:
> Am Montag, 11. Dezember 2006 15:30, schrieb Andreas Hartmetz:
> > The list of methods is quite long. It's harder than necessary to find
> > what you are looking for and that makes the API harder to use. About
> > the 5% that need non-default parameters: it's basically
> > act.setDefaultShortcut() vs. act.setShortcut(DefaultShortcut).
> > ATM there are 4 convenience methods for every type of shortcut a
> > KAction can have (local and global), 8 total. To illustrate, here is
> > what they do for local shortcuts:
> > activeShortcut() -> shortcut()
> > setActiveShortcut() -> setShortcut(ActiveShortcut)
> > defaultShortcut() -> shortcut(DefaultShortcut)
> > setDefaultShortcut() -> setShortcut(DefaultShortcut)
> > In the out-of-date API docs on the web, "active" is still called "custom".
> > You can trust me or grep some KDE source tree yourself to see that
> > everything except setShortcut() is rarely used.
>
> Instead of grepping locally one can also use http://lxr.kde.org, e.g.
> http://lxr.kde.org/ident?i=setActiveShortcut


Slightly offtopic, but what code is used to parse the *.h and *.cpp
files? I'd like strigi to index declarations and definitions too, so
that one can do fast and targetted search in source code.

Cheers,
Jos




More information about the kde-core-devel mailing list