Use QAction::setShortcut() rather than setShortcuts()

This is simpler and we don't need a list of shortcuts here, as we only
allow specifying a single one anyhow.

See https://github.com/wxWidgets/wxWidgets/pull/1544
This commit is contained in:
Vadim Zeitlin
2019-09-27 13:52:42 +02:00
parent 41caeebd8c
commit 99bbc523f7

View File

@@ -177,9 +177,7 @@ void wxQtAction::UpdateShortcutsFromLabel(const wxString& text)
const wxString accelStr = text.AfterFirst('\t');
if ( !accelStr.empty() )
{
QList<QKeySequence> shortcuts;
shortcuts.append( QKeySequence( wxQtConvertString(accelStr) ) );
setShortcuts( shortcuts );
setShortcut( QKeySequence( wxQtConvertString(accelStr) ) );
}
#endif // wxUSE_ACCEL
}