Package: lxqt-config / 0.14.1-2

fix-keybord-layout-shortcut.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From dfe9a2b27aab40262b9186672fad480a406d5c4a Mon Sep 17 00:00:00 2001
From: Tsu Jan <tsujan2000@gmail.com>
Date: Fri, 22 Mar 2019 19:55:32 +0430
Subject: [PATCH] Fixed changing keyboard layout switch shortcut and model

Fixes https://github.com/lxqt/lxqt-config/issues/445
---
 lxqt-config-input/keyboardlayoutconfig.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lxqt-config-input/keyboardlayoutconfig.cpp b/lxqt-config-input/keyboardlayoutconfig.cpp
index f5a7f24..bc6c369 100644
--- a/lxqt-config-input/keyboardlayoutconfig.cpp
+++ b/lxqt-config-input/keyboardlayoutconfig.cpp
@@ -40,8 +40,14 @@ KeyboardLayoutConfig::KeyboardLayoutConfig(LXQt::Settings* _settings, QWidget* p
   connect(ui.removeLayout, &QAbstractButton::clicked, this, &KeyboardLayoutConfig::onRemoveLayout);
   connect(ui.moveUp, &QAbstractButton::clicked, this, &KeyboardLayoutConfig::onMoveUp);
   connect(ui.moveDown, &QAbstractButton::clicked, this, &KeyboardLayoutConfig::onMoveDown);
-  connect(ui.keyboardModel, QOverload<int>::of(&QComboBox::activated), this, &KeyboardLayoutConfig::settingsChanged);
-  connect(ui.switchKey, QOverload<int>::of(&QComboBox::activated), this, &KeyboardLayoutConfig::settingsChanged);
+  connect(ui.keyboardModel, QOverload<int>::of(&QComboBox::activated), [this](int /*index*/) {
+    applyConfig_ = true;
+    Q_EMIT settingsChanged();
+  });
+  connect(ui.switchKey, QOverload<int>::of(&QComboBox::activated), [this](int /*index*/) {
+    applyConfig_ = true;
+    Q_EMIT settingsChanged();
+  });
 }
 
 KeyboardLayoutConfig::~KeyboardLayoutConfig() {