D15140: Fix random order in "Analyze Current File/Project With" menus

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Wed Sep 12 12:38:40 BST 2018

kossebau added a comment.

  I was about to say Ship-It, but first went to ask for adding a note to the code comment in MainWindowPrivate::addPlugin() that this is a hack behind KXmlGui's back, but should be fine, and in the future this should be a functionality of KXmlGui itself.
  Typing those words though, I found myself in conflict with my personal principle of "if-not-a-data-loss-bug-fix-upstream-instead-of-fragile-workaround".
  @antonanikin  Given this is not a grave bug, but just some slightly annoying inconsistency. would you agree we should rather live with the current situation instead of adding potentially fragile code (which needs maintenance by future people), but instead spend efforts on adding support to KXmlGui to allow menu sorting mechanisms?
  When it comes to the Analyzers menus, I have a personal TODO item for a KXmlGui feature to solve in any case, as I would like to get rid of the repeated "Analyze * With" in the actual analyze action menu entries, if listed in that submenu.


> mainwindow_p.cpp:88
> +void sortMenuAlphabetically(QMenu* menu)
> +{

Add also `static`, to keep the funtion symbol private to this compilation unit, which would be better behaviour.
IIUC, as we are in the `KDevelop` namespace here, not the anonymous one, so the symbol is exported from the compilation unit, and might result in clashes with similar util methods from other compilation units on creating the linkage unit (or whatever the term is).

  R32 KDevelop


To: antonanikin, #kdevelop
Cc: kossebau, kdevelop-devel, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180912/c2d12869/attachment.html>

More information about the KDevelop-devel mailing list