Fix jumpy toolbar if button texts have ellipses
Qt uses QAction::iconText()
for QToolButton
. If there is no explicit iconText()
, it falls back to text()
which is stripped of any ...
and &
. Thus same action in menu vs toolbar can have slightly different text. Later when KAccerlatorManager runs, for e.g., when the menu is going to show, it does its own thing and sets the icon text if needed which changes the text for toolbar button actions leading to a jumpy toolbar.
To avoid this, setIconText
for the actions where we know there is a ...
. Additionally remove any &
so that there are no accerlators.