void KAction::setShortcut(const KShortcut &shortcut, ShortcutTypes type) { Q_ASSERT(type); if (type & DefaultShortcut) { setProperty("defaultShortcuts", QVariant::fromValue(shortcut.toList())); } if (type & ActiveShortcut) { QAction::setShortcuts(shortcut); } }
static void setActionShortcut(QAction* action, const KShortcut& shortcut) { if (action) { action->setShortcuts(shortcut.toList()); } }