kylin-burner/0001-Fix-the-problem-of-scrambled-burner.patch
peijiankang 76c2ae4820 Fix the problem of scrambled burner
(cherry picked from commit d59fe3adf3ede9b7deb7cf5aea9be8161bc4a3ac)
2022-08-19 16:18:43 +08:00

28 lines
799 B
Diff

From 6bec876d319f12575da9e96b00323f9d8b78019a Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Fri, 19 Aug 2022 15:58:06 +0800
Subject: [PATCH] Fix the problem of scrambled burner
---
src/main.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main.cpp b/src/main.cpp
index 29b3615..64570e2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -32,7 +32,9 @@ int main(int argc, char *argv[])
QApplication a(argc, argv);
- setlocale(QLocale::China, "zh_CN");
+ //修复中文乱码问题
+ const QString locale = QLocale::system().name();
+ (void) setlocale(LC_ALL, QString(locale + ".UTF-8").toStdString().c_str());
trans.load("qt_zh_CN.qm", "/usr/share/qt5/translations/");
a.installTranslator(&trans);
--
2.33.0