modify version-info error

This commit is contained in:
peijiankang 2022-12-09 15:22:31 +08:00
parent d54c9772b7
commit 2ccb1d2e9e
2 changed files with 38 additions and 3 deletions

View File

@ -0,0 +1,32 @@
From fc98b89e8acc49ab32abe288e794dbb77659f778 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Fri, 9 Dec 2022 15:20:28 +0800
Subject: [PATCH] modify version-info error
---
plugins/system/about/about.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/plugins/system/about/about.cpp b/plugins/system/about/about.cpp
index 688395e..e63591c 100644
--- a/plugins/system/about/about.cpp
+++ b/plugins/system/about/about.cpp
@@ -795,7 +795,14 @@ void About::setupVersionCompenent()
version = rx.cap(1);
}
}
- }
+ else if(str.contains("VERSION=")) {
+ QRegExp rx("VERSION=\"(.*)\"$");
+ int pos = rx.indexIn(str);
+ if (pos > -1) {
+ version = rx.cap(1);
+ }
+ }
+ }
}
if (!version.isEmpty()) {
--
2.33.0

View File

@ -1,12 +1,13 @@
%define debug_package %{nil}
Name: ukui-control-center
Version: 3.1.2
Release: 1
Release: 2
Summary: utilities to configure the UKUI desktop
License: GPL-2+
URL: http://www.ukui.org
Source0: %{name}-%{version}.tar.gz
Patch01: 0001-fix-compile-error-of-ukui-control-center.patch
Patch02: 0001-modify-version-info-error.patch
BuildRequires: qt5-qtsvg-devel
BuildRequires: gsettings-qt-devel
@ -71,8 +72,7 @@ Summary: libukcc
The UKUI control center contains configuration applets for the UKUI des allowing to set accessibility configuration, desktop fonts, keyboard and mouse properties, sound setup, desktop theme and background, user interface properties, screen resolution, and other UKUI parameters.
%prep
%setup -q
%patch01 -p1
%autosetup -n %{name}-%{version} -p1
%build
qmake-qt5
@ -117,6 +117,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Fri Dec 9 2022 peijiankang <peijiankang@kylinos.cn> - 3.1.2-2
- modify version-info error
* Mon Dec 5 2022 peijiankang <peijiankang@kylinos.cn> - 3.1.2-1
- update version to 3.1.2