From 1ca818acec090a5d8c3a18a3e11c9922770ba782 Mon Sep 17 00:00:00 2001 From: peijiankang Date: Fri, 23 Dec 2022 16:13:15 +0800 Subject: [PATCH] Fix the problem of displaying none in the interface version information --- ...in-the-interface-version-information.patch | 41 +++++++++++++++++++ ukui-control-center.spec | 7 +++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 0005-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch 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 0000000..7218c1b --- /dev/null +++ b/0005-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch @@ -0,0 +1,41 @@ +From 1cc7cdb36a52cb242c14e503e8b8b186b3d495d4 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Fri, 23 Dec 2022 16:10:47 +0800 +Subject: [PATCH] Fix the problem of displaying none in the interface version + information + +--- + shell/ukccabout.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/shell/ukccabout.cpp b/shell/ukccabout.cpp +index 547d6f3..371fccf 100644 +--- a/shell/ukccabout.cpp ++++ b/shell/ukccabout.cpp +@@ -99,7 +99,7 @@ QString UkccAbout::getUkccVersion() { + char *q = NULL; + QString version = "none"; + +- pp = popen("dpkg -l ukui-control-center | grep ukui-control-center", "r"); ++ pp = popen("rpm -q ukui-control-center", "r"); + if(NULL == pp) + return version; + +@@ -108,12 +108,12 @@ QString UkccAbout::getUkccVersion() { + *q = '\0'; + + QString content = line; +- QStringList list = content.split(" "); ++ QStringList list = content.split("-"); + + list.removeAll(""); + + if (list.size() >= 3) +- version = list.at(2); ++ version = list.at(3); + } + + free(line); +-- +2.33.0 + diff --git a/ukui-control-center.spec b/ukui-control-center.spec index af1de77..927f9e5 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.1.2 -Release: 4 +Release: 5 Summary: utilities to configure the UKUI desktop License: GPL-2+ URL: http://www.ukui.org @@ -9,6 +9,8 @@ Source0: %{name}-%{version}.tar.gz Patch01: 0001-fix-compile-error-of-ukui-control-center.patch Patch02: 0001-modify-version-info-error.patch Patch03: 0003-fix-power-missing-issue.patch +Patch05: 0005-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch + BuildRequires: qt5-qtsvg-devel BuildRequires: gsettings-qt-devel @@ -120,6 +122,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Dec 23 2022 peijiankang - 3.1.2-5 +- add patch5: 0005-Fix-the-problem-of-displaying-none-in-the-interface-version-information.patch + * Thu Dec 15 2022 peijiankang - 3.1.2-4 - fix power missing issue