aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow/mainwindow.cpp')
-rw-r--r--src/mainwindow/mainwindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp
index e03ec46..36f2759 100644
--- a/src/mainwindow/mainwindow.cpp
+++ b/src/mainwindow/mainwindow.cpp
@@ -56,7 +56,7 @@ MainWindow::MainWindow(QWidget *parent)
{
QAction *subwindowMenuAction = new QAction(this);
QMainWindow::addAction(subwindowMenuAction);
- setShortcut(subwindowMenuAction, "shortcuts.subwindow.menu");
+ config.shortcut<QAction>(*subwindowMenuAction, "shortcuts.subwindow.menu");
connect(subwindowMenuAction, &QAction::triggered, this, [this]() {
QMdiSubWindow *window = mdiArea->currentSubWindow();
if(window != nullptr) {
@@ -131,8 +131,8 @@ MainWindow::MainWindow(QWidget *parent)
// search box
auto *searchAction = new QAction(this);
- setShortcut(searchAction, "shortcuts.window.search");
- connect(searchAction, &QAction::triggered, this, [=]() {
+ config.shortcut<QAction>(*searchAction, "shortcuts.window.search");
+ connect(searchAction, &QAction::triggered, this, [this]() {
/* QTBUG-18665
* When focusing out of the search box and hiding it, the first
* (or earlier?) subwindow gets activated for some reason.