Hide multi-keystroke accelerators in Mac menu (bug 12693).

Patch from Juergen.

(cherry picked from commit fb43449c80)
This commit is contained in:
Pavel Sanda 2023-07-05 20:45:26 +02:00 committed by Richard Kimberly Heck
parent 27ef57096c
commit d04c406222

View File

@ -1982,8 +1982,16 @@ static QString label(MenuItem const & mi)
}
QString const binding = mi.binding();
#if defined(Q_OS_MAC)
// MacOS cannot display complex bindings, so hide those
// https://doc.qt.io/qt-6/macos-issues.html#menu-actions
// #12693
if (!binding.isEmpty() && !binding.contains(" "))
label += '\t' + binding;
#else
if (!binding.isEmpty())
label += '\t' + binding;
#endif
return label;
}