!69 Fix the problem of displaying none in the interface version information

From: @hua_yadong 
Reviewed-by: @pei-jiankang 
Signed-off-by: @pei-jiankang
This commit is contained in:
openeuler-ci-bot 2022-03-10 02:26:20 +00:00 committed by Gitee
commit e6b921820e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 47 additions and 1 deletions

View File

@ -0,0 +1,41 @@
From 5fde797a955ccf550c034a509208e6bbddd037a2 Mon Sep 17 00:00:00 2001
From: huayadong <huayadong@kylinos.cn>
Date: Wed, 9 Mar 2022 15:54:43 +0800
Subject: [PATCH] ssssssss
---
shell/ukccabout.cpp | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/shell/ukccabout.cpp b/shell/ukccabout.cpp
index 9fb591b..416e251 100644
--- a/shell/ukccabout.cpp
+++ b/shell/ukccabout.cpp
@@ -148,21 +148,16 @@ QString UkccAbout::getUkccVersion() {
char *q = NULL;
QString version = "none";
- pp = popen("dpkg -l ukui-control-center | grep ukui-control-center", "r");
+ pp = popen("rpm -qa ukui-control-center", "r");
if(NULL == pp)
return version;
while((read = getline(&line, &len, pp)) != -1){
q = strrchr(line, '\n');
*q = '\0';
-
QString content = line;
- QStringList list = content.split(" ");
-
- list.removeAll("");
-
- if (list.size() >= 3)
- version = list.at(2);
+ QStringList list = content.split("-");
+ version = list.at(3);
}
free(line);
--
2.33.0

View File

@ -1,7 +1,7 @@
%define debug_package %{nil}
Name: ukui-control-center
Version: 3.0.4
Release: 6
Release: 7
Summary: utilities to configure the UKUI desktop
License: GPL-2+
URL: http://www.ukui.org
@ -10,6 +10,7 @@ Patch01: 0001-modify-version-info-error.patch
Patch02: 0002-modify-area-info-display-error.patch
Patch03: 0003-fix-power-missing-issue.patch
Patch04: 0004-disable-the-str-of-password-check.patch
Patch05: 0005-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch
BuildRequires: qt5-qtsvg-devel
BuildRequires: qt5-qtbase-devel
@ -111,6 +112,7 @@ Suggests: ukui-settings-daemon
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
qmake-qt5
@ -159,6 +161,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Mar 09 2022 huayadong <huayadong@kylinos.cn> - 3.0.4-7
- add patch5: 0004-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch
* Wed Mar 09 2022 pei-jiankang <peijiankang@kylinos.cn> - 3.0.4-6
- modify audio-info display