--- a/src/mainwindow.cpp Sun Nov 03 18:17:08 2019 +0200 +++ b/src/mainwindow.cpp Fri Nov 08 19:05:07 2019 +0200 @@ -8,6 +8,7 @@ #include "settingseditor/settingseditor.h" #include "version.h" #include "document.h" +#include "uiutilities.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow{parent}, @@ -17,6 +18,7 @@ libraries{this} { this->ui->setupUi(this); + defaultKeyboardShortcuts = uiutilities::makeKeySequenceMap(uiutilities::collectActions(this)); connect(ui->actionNew, &QAction::triggered, this, &MainWindow::newModel); connect(ui->actionOpen, &QAction::triggered, this, &MainWindow::openModel); connect(ui->actionQuit, &QAction::triggered, this, &QMainWindow::close); @@ -124,7 +126,7 @@ void MainWindow::runSettingsEditor() { - SettingsEditor settingsEditor{&this->settings, this}; + SettingsEditor settingsEditor{&this->settings, this->defaultKeyboardShortcuts, this}; const int result = settingsEditor.exec(); if (result == QDialog::Accepted) {