Version: 3.0 (using KDE 4.6.2) OS: Linux When I try to access to main menu items using keyboard some items change their access char to first char. Problem appears only in first try to access to menu item Reproducible: Always Steps to Reproduce: Launch KATE window. Now try change highlighting settings for PHP(HTML) scripts: 1. Press "Alt + t"; 2. Then press "h". 3. Then try to press "r". Actual Results: After "r" has been pressed а "Scripts" list had to appear, but it does not appear, because it access char has been changed to first char "S"(first char is underlined) OS: Linux (i686) release 2.6.38-8-generic Compiler: cc
When opening the Highlighting menu the first time, the entries "Scientific", "Scripts" and "Sources" all have the accelerator "&S". However, when opening the menu the second time, this issue is solved. The reason for the multiple assignment of the accelerators is that we use the code QMenu *qmenu = new QMenu ('&'+hlSection); in KateHighlightingMenu::slotAboutToShow(). We do use KAcceleratorManager [1] to automatically solve such clashes. However, the Highlighting menu is created on the fly by filling it in the slot KateHighlightingMenu::slotAboutToShow(). KAcceleratorManager also uses the signal aboutToShow() to handle dynamically chaning menus. So the problem probably is that the accelerator manager checks clashes too early, i.e. before the highlighting menu is filled. [1] http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKAcceleratorManager.html
As followup from the kde-devel mailing list: A possible solution is to make the KAcceleratorManager use the QShowEvent by using an event filter. Right now, the constructor handling popup menus says (kdelibs/kdeui/shortcuts/kacceleratormanager.cpp): KPopupAccelManager::KPopupAccelManager(QMenu *popup) : QObject(popup), m_popup(popup), m_count(-1) { aboutToShow(); // do one check and then connect to show connect(popup, SIGNAL(aboutToShow()), SLOT(aboutToShow())); } Here, the event filter has to be installed on the popup menu. Does anyone have a kdelibs build to try this?
*** Bug 257960 has been marked as a duplicate of this bug. ***
Created attachment 75007 [details] patch to kdeui This patch implements what is suggested on the mailing list: http://lists.kde.org/?l=kde-devel&m=130546957219649&w=2 I use KDE with this patch for 10 days now, and I'm not annoyed anymore by this bug :) However, this is somewhat blind-programming because I don't know Qt/KDE API enough to explain why it seems to fix the bug (hence the lack of commit message in the patch).
Hi, kdelibs (version 4 and earlier) is no longer maintained since a few years. KDE Frameworks 5 or 6 might already have resolved this bug. If not, please re-open against the matching framework if feasible or against the application that shows the issue. We then can still dispatch it to the right Bugzilla product or component. Greetings Christoph Cullmann