ukui-control-center/0010-Fix-the-problem-of-scrambled-shortcut-keys.patch
peijiankang a1ce789a3b add 0010-Fix-the-problem-of-scrambled-shortcut-keys.patch
(cherry picked from commit abb23f50f3efcffe40931fcc1b0308773d05aeb9)
2022-08-16 10:58:44 +08:00

28 lines
844 B
Diff

From d4982a90afbc954404f1bb821e636f57c599e3ef Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Mon, 15 Aug 2022 14:48:53 +0800
Subject: [PATCH] Fix the problem of scrambled shortcut keys
---
plugins/devices/shortcut/shortcut.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/plugins/devices/shortcut/shortcut.cpp b/plugins/devices/shortcut/shortcut.cpp
index 15c37ca..2f52086 100644
--- a/plugins/devices/shortcut/shortcut.cpp
+++ b/plugins/devices/shortcut/shortcut.cpp
@@ -96,6 +96,10 @@ int Shortcut::get_plugin_type()
QWidget *Shortcut::get_plugin_ui()
{
+ //修复快捷键中文乱码问题
+ const QString locale = QLocale::system().name();
+ (void) setlocale(LC_ALL, QString(locale + ".UTF-8").toStdString().c_str());
+
if (mFirstLoad) {
mFirstLoad = false;
--
2.33.0