| 63 | } |
| 64 | |
| 65 | void ActionValidator::insert(QAction *action) |
| 66 | { |
| 67 | Q_ASSERT(action); |
| 68 | |
| 69 | Q_FOREACH (const QKeySequence &sequence, action->shortcuts()) { |
| 70 | if (m_shortcutActionMap.values(sequence).contains(action)) |
| 71 | continue; |
| 72 | |
| 73 | m_shortcutActionMap.insert(sequence, action); |
| 74 | } |
| 75 | |
| 76 | // also track object destruction |
| 77 | connect(action, &QObject::destroyed, |
| 78 | this, &ActionValidator::handleActionDestroyed); |
| 79 | } |
| 80 | |
| 81 | |
| 82 |
no outgoing calls