[kde-doc-english] genshortcutents

Frerich Raabe frerich.raabe at googlemail.com
Thu Jun 13 16:21:36 UTC 2013


On Jun 13, 2013, at 9:16 AM, David Faure <faure+bluesystems at kde.org> wrote:

> As part of the KDE Frameworks 5 effort (restructuring kdelibs), I stumbled 
> upon the tool called "genshortcutents", which sits next to meinproc in 
> kdelibs/kdoctools, and is documented as:
> "Generates DocBook entities for key shortcuts of standard actions".

Oh, it still exists! :-)

> It seems that the idea (when Frerich committed it, in KDE3 times) was to 
> generate a kde-standards-accels.entities file, and install it as part of 
> kdelibs.

That's right; the idea was that we don't hardcode accelerators used to
trigger actions (e.g. Ctrl+O to open a new file) in the documentation. Instead,
we just use an entity like &fileOpenAcc; and then have those entities generated
at build time with the values specified in the KDE (i.e. kdelibs). So it was
a measure to avoid that keyboard accelerators used in the documentation get out
of sync with what the application actually uses.

> However this broke with KDE 4.0 (when switching from unsermake to cmake), and 
> the fact that nobody fixed it since then, would seem to indicate that nobody 
> is actually using these entities.

Apparently so. I'm pretty sure the de-standard-accels.entities was used at some
point, but who knows - maybe those applications don't even exist anymore.

> The reason this is showing up now is that we're looking at replacing (long 
> term) KStandardShortcut with the Qt QKeySequence standard accel, so we're 
> wondering about the impact on that code.
> 
> But if it's unused.... can we get rid of it, rather than have to worry about 
> porting it ?

If nothing broke, then there's probably no point to port it. That being said, I
would have thought that the original issue (avoiding duplication between
documentation and source code as far as keyboard accelerators go) still exists.
Or are there other measures to address that by now?

- Frerich



More information about the kde-doc-english mailing list