add 0014-modify-the-error-of-ukui-control-center-open.patch
(cherry picked from commit 41b1785d97f93c6f93aa68c3505b395c738898e6)
This commit is contained in:
parent
a9844724f8
commit
cf6fb499a2
64
0014-modify-the-error-of-ukui-control-center-open.patch
Normal file
64
0014-modify-the-error-of-ukui-control-center-open.patch
Normal file
@ -0,0 +1,64 @@
|
||||
From cd42ab432e63ec38e0339c9d075499b2b628db7b Mon Sep 17 00:00:00 2001
|
||||
From: pei-jiankang <peijiankang@kylinos.cn>
|
||||
Date: Fri, 15 Oct 2021 14:10:28 +0800
|
||||
Subject: [PATCH] modify the error of ukui-control-center open
|
||||
|
||||
---
|
||||
plugins/messages-task/about/about.cpp | 5 +++--
|
||||
plugins/messages-task/about/cpuinfo.cpp | 5 +++--
|
||||
plugins/messages-task/about/memoryentry.cpp | 2 +-
|
||||
3 files changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/plugins/messages-task/about/about.cpp b/plugins/messages-task/about/about.cpp
|
||||
index a2dc766..77f99da 100755
|
||||
--- a/plugins/messages-task/about/about.cpp
|
||||
+++ b/plugins/messages-task/about/about.cpp
|
||||
@@ -106,8 +106,9 @@ void About::setupKernelCompenent() {
|
||||
|
||||
MemoryEntry memoryInfo;
|
||||
QStringList memory = memoryInfo.totalMemory();
|
||||
- memorySize = memory.at(0) + "(" + memory.at(1) + tr(" available") + ")";
|
||||
-
|
||||
+ if(memory.size() >=2) {
|
||||
+ memorySize = memory.at(0) + "(" + memory.at(1) + tr(" available") + ")";
|
||||
+ }
|
||||
ui->kernalContent->setText(kernal);
|
||||
ui->memoryContent->setText(memorySize);
|
||||
|
||||
diff --git a/plugins/messages-task/about/cpuinfo.cpp b/plugins/messages-task/about/cpuinfo.cpp
|
||||
index d208453..0fb1461 100644
|
||||
--- a/plugins/messages-task/about/cpuinfo.cpp
|
||||
+++ b/plugins/messages-task/about/cpuinfo.cpp
|
||||
@@ -20,14 +20,15 @@ QString cpuinfo::getCpuName()
|
||||
|
||||
for (QString str : outputlist) {
|
||||
if (str.contains("型号名称")){
|
||||
- name = QString(str).right(str.length() - 28);
|
||||
+ name = QString(str).right(str.length() - (str.indexOf(":") + 1));
|
||||
break;
|
||||
}
|
||||
else if(str.contains("Model name")) {
|
||||
- name = QString(str).right(str.length() - 33);
|
||||
+ name = QString(str).right(str.length() - (str.indexOf(":") + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
+ name.remove(QRegExp("^ +\\s*"));
|
||||
#elif defined(Q_OS_FREEBSD)
|
||||
|
||||
#endif
|
||||
diff --git a/plugins/messages-task/about/memoryentry.cpp b/plugins/messages-task/about/memoryentry.cpp
|
||||
index f1b1bef..b48b9b7 100755
|
||||
--- a/plugins/messages-task/about/memoryentry.cpp
|
||||
+++ b/plugins/messages-task/about/memoryentry.cpp
|
||||
@@ -76,6 +76,6 @@ QStringList MemoryEntry::totalMemory()
|
||||
res << total << available;
|
||||
return res;
|
||||
}
|
||||
-
|
||||
+ res << "N/A" << "N/A";
|
||||
return res;
|
||||
}
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
%define debug_package %{nil}
|
||||
Name: ukui-control-center
|
||||
Version: 3.0.1
|
||||
Release: 19
|
||||
Release: 20
|
||||
Summary: utilities to configure the UKUI desktop
|
||||
License: GPL-2+
|
||||
URL: http://www.ukui.org
|
||||
@ -89,6 +89,7 @@ patch15: fix_add_group_failed_issue.patch
|
||||
patch16: fix_user_passwd_valid_time_setting_failed_issue.patch
|
||||
patch17: 0013-cpuinfo-in-arm-system-is-null.patch
|
||||
patch18: fix_user_passwd_valid_issue.patch
|
||||
patch19: 0014-modify-the-error-of-ukui-control-center-open.patch
|
||||
|
||||
Recommends: qt5-qtquickcontrols
|
||||
|
||||
@ -128,6 +129,7 @@ Suggests: ukui-settings-daemon
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
%patch19 -p1
|
||||
|
||||
%build
|
||||
qmake-qt5
|
||||
@ -169,6 +171,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_sysconfdir}/xdg/autostart/ukui-group-manager.desktop
|
||||
|
||||
%changelog
|
||||
* Tue Oct 19 2021 peijiankang <peijiankang@kylinos.cn> - 3.0.1-20
|
||||
- add 0014-modify-the-error-of-ukui-control-center-open.patch
|
||||
|
||||
* Thu Sep 16 2021 douyan <douyan@kylinos.cn> - 3.0.1-19
|
||||
- add fix_user_passwd_valid_issue.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user