!7 [sync] PR-5: Fix the problem of scrambled burner

From: @openeuler-sync-bot 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
This commit is contained in:
openeuler-ci-bot 2022-08-19 08:46:38 +00:00 committed by Gitee
commit 3ec0da785b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,27 @@
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

View File

@ -1,11 +1,12 @@
%define debug_package %{nil}
Name: kylin-burner
Version: 3.10.2
Release: 2
Release: 3
Summary: CD/DVD burning application for UKUI.
License: GPL-3.0-or-later
URL: https://github.com/UbuntuKylin/kylin-burner
Source0: %{name}-%{version}.tar.gz
Patch01: 0001-Fix-the-problem-of-scrambled-burner.patch
BuildRequires: cmake
BuildRequires: qt5-qtx11extras-devel
@ -27,6 +28,7 @@ CD/DVD burning application for UKUI.
%prep
%setup -q
%patch01 -p1
%build
mkdir cmake-build
@ -47,6 +49,9 @@ popd
%{_datadir}/locale/zh_CN/LC_MESSAGES/kylin-burner.mo
%changelog
* Fri Aug 19 2022 peijiankang <peijiankang@kylinos.cn> - 3.10.2-3
- Fix the problem of scrambled burner
* Thu May 26 2022 peijiankang <peijiankang@kylinos.cn> - 3.10.2-2
- remove {%if 0 and %endif}