https://bugs.kde.org/show_bug.cgi?id=454778
Bug ID: 454778 Summary: The regexp check for shortcuts MnemonicData detection is not sufficient Product: frameworks-qqc2-desktop-style Version: unspecified Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: notm...@gmail.com Reporter: m...@ratijas.tk CC: ahiems...@heimr.nl, k...@davidedmundson.co.uk, noaha...@gmail.com Target Milestone: --- SUMMARY This code is problematic: Shortcut { //in case of explicit & the button manages it by itself enabled: !(RegExp(/\&[^\&]/).test(controlRoot.text)) It does not handle even what it's directly supposed to: an ampersand but not a double ampersand. This snippet is duplicated across several controls. It should be fixed by rewriting into native (C++) code. STEPS TO REPRODUCE 1. console.log(!(RegExp(/\&[^\&]/).test("Yaha && ha!"))) OBSERVED RESULT false EXPECTED RESULT true ADDITIONAL INFORMATION Affected components are: - Button.qml - CheckBox.qml - MenuBarItem.qml - MenuItem.qml - RadioButton.qml - Switch.qml - TabButton.qml - ToolButton.qml -- You are receiving this mail because: You are watching all bug changes.