| 235 | } |
| 236 | |
| 237 | void RegistersView::insertAction(const QString& name, Qt::Key k) |
| 238 | { |
| 239 | auto* a = new QAction(this); |
| 240 | a->setCheckable(true); |
| 241 | a->setShortcut(k); |
| 242 | a->setText(name); |
| 243 | a->setShortcutContext(Qt::WidgetWithChildrenShortcut); |
| 244 | m_actions.append(a); |
| 245 | addAction(a); |
| 246 | |
| 247 | connect(a, &QAction::triggered, this, [this, a](){ menuTriggered(a->text()); }); |
| 248 | } |
| 249 | |
| 250 | #include "moc_registersview.cpp" |
no test coverage detected