diff --git a/0005-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch b/0005-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch new file mode 100644 index 0000000000000000000000000000000000000000..3b1cbb0f88a3db127353070fccd8927e2e58eb16 --- /dev/null +++ b/0005-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch @@ -0,0 +1,41 @@ +From 5fde797a955ccf550c034a509208e6bbddd037a2 Mon Sep 17 00:00:00 2001 +From: huayadong +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 + diff --git a/ukui-control-center.spec b/ukui-control-center.spec index f353d90badadc206fe571adc55b356d0f8985a59..f0c81376a5a8cd8ebc48974cb71d859017e1b38f 100644 --- a/ukui-control-center.spec +++ b/ukui-control-center.spec @@ -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 - 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 - 3.0.4-6 - modify audio-info display