D7964: KAcceleratorManager: set icon text on actions to remove CJK markers

David Faure noreply at phabricator.kde.org
Sun Sep 24 08:44:48 UTC 2017


dfaure created this revision.
dfaure added reviewers: mardelle, ilic, sandsmark.

REVISION SUMMARY
  This replaces the KToolBar event filter hack to solve the same issue:
  when an action text appears in a menu we want the & accelerator, while in
  toolbars wewant that removed. Qt takes care of it, except for the more tricky
  case of CJK markers: "<chinese here> (&O)" where &O exists only to get an ascii
  accelerator.
  Instead of hacking the text at painting time (!) it's much more robust to
  remove " (&O)" from action texts and sett hat as the icon text upfront.
  
  With this in, we can remove the KToolBar hack which leads to endless repaints.
  BUG: 365050
  BUG: 377859

TEST PLAN
  Unittest

BRANCH
  cjk_markers

REVISION DETAIL
  https://phabricator.kde.org/D7964

AFFECTED FILES
  autotests/kacceleratormanagertest.cpp
  src/CMakeLists.txt
  src/common_helpers.cpp
  src/common_helpers_p.h
  src/kacceleratormanager.cpp

To: dfaure, mardelle, ilic, sandsmark
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170924/0d201e87/attachment.html>


More information about the Kde-frameworks-devel mailing list