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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user