From 83eaed56c12c1791a995bd7d90613f718034705e Mon Sep 17 00:00:00 2001 From: mrbesen Date: Mon, 28 Feb 2022 14:40:54 +0100 Subject: [PATCH] updated to new qxtglobal shortcut version; fixed bug with reloading config disables buttons --- QxtGlobalShortcut | 2 +- src/mainwindow.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/QxtGlobalShortcut b/QxtGlobalShortcut index 66d7419..0b6f10a 160000 --- a/QxtGlobalShortcut +++ b/QxtGlobalShortcut @@ -1 +1 @@ -Subproject commit 66d741954d224eb3835cb84b682a50760aa4d1ee +Subproject commit 0b6f10adc8355555d25e85469a5d713012a414ee diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8296348..0c0b377 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -22,14 +22,7 @@ MainWindow::MainWindow(const std::string& binary, QWidget* parent) : QMainWindow QObject::connect(ui->actionSaveConfig, SIGNAL( triggered() ), this, SLOT( saveConfig() )); QObject::connect(ui->actionButtonManager, SIGNAL( triggered() ), this, SLOT( openButtonManager() )); QObject::connect(ui->alwaysOnTop, SIGNAL( stateChanged(int) ), this, SLOT( alwaysOnTopSettingChange(int) )); - QObject::connect(stopGlobal, SIGNAL( activated() ), this, SLOT( stop() )); QObject::connect(this, SIGNAL(newStatusMessage(const QString&)), ui->statusbar, SLOT(showMessage(const QString&))); - - QObject::connect(up, SIGNAL( activated() ), this, SLOT( moveUp() )); - QObject::connect(down, SIGNAL( activated() ), this, SLOT( moveDown() )); - QObject::connect(left, SIGNAL( activated() ), this, SLOT( moveLeft() )); - QObject::connect(right, SIGNAL( activated() ), this, SLOT( moveRight() )); - QObject::connect(play, SIGNAL( activated() ), this, SLOT( playCurrent() )); } MainWindow::~MainWindow() { @@ -177,6 +170,13 @@ void MainWindow::loadShortcuts() { right = loadShortcut(sc.right); play = loadShortcut(sc.play); stopGlobal = loadShortcut(sc.stop); + + QObject::connect(up, SIGNAL( activated() ), this, SLOT( moveUp() )); + QObject::connect(down, SIGNAL( activated() ), this, SLOT( moveDown() )); + QObject::connect(left, SIGNAL( activated() ), this, SLOT( moveLeft() )); + QObject::connect(right, SIGNAL( activated() ), this, SLOT( moveRight() )); + QObject::connect(play, SIGNAL( activated() ), this, SLOT( playCurrent() )); + QObject::connect(stopGlobal, SIGNAL( activated() ), this, SLOT( stop() )); } void MainWindow::removeAllButtons() {