Exemple #1
0
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);
    }
}
Exemple #2
0
static void setActionShortcut(QAction* action, const KShortcut& shortcut)
{
    if (action) {
        action->setShortcuts(shortcut.toList());
    }
}