<table><tr><td style="">dfaure created this revision.<br />dfaure added reviewers: mardelle, ilic, sandsmark.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7964" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This replaces the KToolBar event filter hack to solve the same issue:<br />
when an action text appears in a menu we want the & accelerator, while in<br />
toolbars wewant that removed. Qt takes care of it, except for the more tricky<br />
case of CJK markers: "<chinese here> (&O)" where &O exists only to get an ascii<br />
accelerator.<br />
Instead of hacking the text at painting time (!) it's much more robust to<br />
remove " (&O)" from action texts and sett hat as the icon text upfront.</p>

<p>With this in, we can remove the KToolBar hack which leads to endless repaints.<br />
BUG: 365050<br />
BUG: 377859</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Unittest</p></div></div><br /><div><strong>BRANCH</strong><div><div>cjk_markers</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7964" rel="noreferrer">https://phabricator.kde.org/D7964</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/kacceleratormanagertest.cpp<br />
src/CMakeLists.txt<br />
src/common_helpers.cpp<br />
src/common_helpers_p.h<br />
src/kacceleratormanager.cpp</div></div></div><br /><div><strong>To: </strong>dfaure, mardelle, ilic, sandsmark<br /><strong>Cc: </strong>Frameworks<br /></div>