feat(editor): debug shortcut for reloading most recent file

This commit is contained in:
maelstrom 2025-09-01 20:14:57 +02:00
parent 3dfc3abaf8
commit bea19b21d7

View file

@ -146,6 +146,18 @@ MainWindow::MainWindow(QWidget *parent)
});
setUpCommandBar();
#ifndef NDEBUG
// https://stackoverflow.com/a/17631703/16255372
// Add shortcut for reloading most recent file
QAction* reloadMostRecent = new QAction();
reloadMostRecent->setShortcut(Qt::Key_R | Qt::CTRL);
connect(reloadMostRecent, &QAction::triggered, [this, reloadMostRecent]() {
recentsMenu->actions()[0]->trigger();
removeAction(reloadMostRecent);
});
addAction(reloadMostRecent);
#endif
}
void MainWindow::closeEvent(QCloseEvent* evt) {