sync form 24.03-LTS

This commit is contained in:
peijiankang 2024-11-20 14:00:14 +08:00
parent 8890ecbc78
commit 02c7e2e9a5
5 changed files with 227 additions and 4 deletions

View File

@ -0,0 +1,59 @@
From 4a7799b78457d9fa9017fa5a2f5b0d4c4c7ec9af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= <houhongxun@kylinos.cn>
Date: Tue, 25 Jun 2024 14:21:22 +0800
Subject: [PATCH] fix object created in wrong thread
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
---
plugins/time-language/datetime/datetime.cpp | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/plugins/time-language/datetime/datetime.cpp b/plugins/time-language/datetime/datetime.cpp
index 86e0518..e657a08 100644
--- a/plugins/time-language/datetime/datetime.cpp
+++ b/plugins/time-language/datetime/datetime.cpp
@@ -783,6 +783,12 @@ void DateTime::synctimeFormatSlot(bool status,bool outChange)
connect(syncThread, &CGetSyncRes::finished, this, [=](){
syncThread->deleteLater();
ui->radioButton_2->setEnabled(true);
+ if (syncThreadFlag == false) { //创建线程一直查时间同步是否成功
+ CSyncTime *syncTimeThread = new CSyncTime(this,successMSG,failMSG);
+ connect(syncTimeThread,SIGNAL(finished()),syncTimeThread,SLOT(deleteLater()));
+ syncTimeThread->start();
+ syncThreadFlag = true;
+ }
});
syncThread->start();
ui->radioButton_2->setEnabled(false);
@@ -954,6 +960,7 @@ CGetSyncRes::~CGetSyncRes()
}
void CGetSyncRes::run()
{
+ syncThreadFlag = false;
for(qint8 i = 0; i < 80; ++i) {
if (this->dataTimeUI->getSyncStatus() == false) {
this->dataTimeUI->syncNetworkRetLabel->setText("");
@@ -971,16 +978,11 @@ void CGetSyncRes::run()
} else { //同步时间成功
DateTime::syncRTC();
this->dataTimeUI->syncNetworkRetLabel->setText(successMSG);
+ syncThreadFlag = true;
return;
}
}
this->dataTimeUI->syncNetworkRetLabel->setText(failMSG);
- if (syncThreadFlag == false) { //创建线程一直查时间同步是否成功
- CSyncTime *syncTimeThread = new CSyncTime(this->dataTimeUI,successMSG,failMSG);
- connect(syncTimeThread,SIGNAL(finished()),syncTimeThread,SLOT(deleteLater()));
- syncTimeThread->start();
- syncThreadFlag = true;
- }
return;
}
--
2.33.0

View File

@ -0,0 +1,77 @@
From 67187a2ac22acad835b8e78a5007a77776c34742 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Fri, 10 May 2024 15:44:06 +0800
Subject: [PATCH] fix cpuinfo error of ukui-control-center-3.1.2
---
shell/utils/utils.cpp | 34 ++++++++++++++++++++++++++++++++++
shell/utils/utils.h | 1 +
2 files changed, 35 insertions(+)
diff --git a/shell/utils/utils.cpp b/shell/utils/utils.cpp
index 3c859a1..0680ab9 100644
--- a/shell/utils/utils.cpp
+++ b/shell/utils/utils.cpp
@@ -57,6 +57,39 @@ QVariantMap Utils::getModuleHideStatus() {
}
QString Utils::getCpuInfo() {
+ QFile file("/proc/cpuinfo");
+
+ if (file.open(QIODevice::ReadOnly)) {
+ QString buffer = file.readAll();
+ QStringList modelLine = buffer.split('\n').filter(QRegularExpression("^model name"));
+ QStringList modelLineWayland = buffer.split('\n').filter(QRegularExpression("^Hardware"));
+ QStringList lines = buffer.split('\n');
+
+ if (modelLine.isEmpty()) {
+ if (modelLineWayland.isEmpty()) {
+ QString lscpuresult = getlscpuinfo();
+ if (lscpuresult == "")
+ return "Unknown";
+ return lscpuresult;
+ }
+ modelLine = modelLineWayland;
+ }
+
+
+ int count = lines.filter(QRegularExpression("^processor")).count();
+
+ QString result;
+ result.append(modelLine.first().split(':').at(1));
+ result = result.trimmed();
+
+ return result;
+ }
+
+ return QString();
+}
+
+QString Utils::getlscpuinfo()
+{
QString result = "";
QProcess process;
process.start("lscpu");
@@ -74,6 +107,7 @@ QString Utils::getCpuInfo() {
break;
}
}
+ result = result.trimmed();
return result;
}
diff --git a/shell/utils/utils.h b/shell/utils/utils.h
index 71fb3bd..86e6150 100644
--- a/shell/utils/utils.h
+++ b/shell/utils/utils.h
@@ -40,6 +40,7 @@ namespace Utils
QRect sizeOnCursor();
QVariantMap getModuleHideStatus();
QString getCpuInfo();
+ QString getlscpuinfo();
QString getCpuArchitecture();
bool isExistEffect();
bool isExistBattery();
--
2.43.0

View File

@ -0,0 +1,26 @@
From 154ef4cd4ba90888c467d00a91337764628538ca Mon Sep 17 00:00:00 2001
From: huayadong <huayadong@kylinos.cn>
Date: Tue, 4 Jun 2024 09:13:48 +0800
Subject: [PATCH]
fix-the-display-resolution-does-not-match-the-actual-resolution.patch
---
plugins/system/display/outputconfig.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/system/display/outputconfig.cpp b/plugins/system/display/outputconfig.cpp
index a25f215..601215c 100644
--- a/plugins/system/display/outputconfig.cpp
+++ b/plugins/system/display/outputconfig.cpp
@@ -231,7 +231,7 @@ void OutputConfig::initConnection()
});
//监听,否则无法处理修改分辨率/刷新率未保存
connect(mOutput.data(), &KScreen::Output::currentModeIdChanged, this, [=]() {
- if (!mIsRestore || !mOutput->currentMode()) {
+ if (!mOutput->currentMode()) {
mIsRestore = true;
return;
}
--
2.43.0

View File

@ -0,0 +1,38 @@
From bb0c313ac7eb6a3f3d99e3ab86b41946feab53aa Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Thu, 21 Dec 2023 15:36:28 +0800
Subject: [PATCH]
ukui-control-center-3.1.2-repair-freelogin-autologin-not-available
---
plugins/account/userinfo/userinfo.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/plugins/account/userinfo/userinfo.cpp b/plugins/account/userinfo/userinfo.cpp
index 8288eb1..ebc21b9 100644
--- a/plugins/account/userinfo/userinfo.cpp
+++ b/plugins/account/userinfo/userinfo.cpp
@@ -823,7 +823,7 @@ void UserInfo::setUserConnect(){
QDBusConnection::systemBus());
qDebug() << "call" << "method: deleteuser";
- QDBusReply<int> ret = tmpSysinterface->call("setAutoLoginStatus", user.objpath, checked);
+ QDBusReply<int> ret = tmpSysinterface->call("setAutoLoginStatus", checked, user.username);
if (ret == 0) {
autoLoginSBtn->blockSignals(true);
@@ -852,8 +852,9 @@ void UserInfo::setUserConnect(){
return;
}
- QDBusReply<bool> ret = piface.call("setNoPwdLoginStatus", checked, user.username);
- if (ret == false) {
+ QDBusReply<int> ret = piface.call("setNoPwdLoginStatus", checked, user.username);
+
+ if (ret == 0) {
nopwdLoginSBtn->blockSignals(true);
nopwdLoginSBtn->setChecked(!checked);
nopwdLoginSBtn->blockSignals(false);
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: ukui-control-center
Version: 3.1.2
Release: 29
Release: 33
Summary: utilities to configure the UKUI desktop
License: GPL-2+
URL: http://www.ukui.org
@ -27,10 +27,14 @@ Patch22: cpuinfo-in-arm-system-is-null.patch
Patch23: add-ukcc-setlang.patch
Patch24: fix-changeusertype-error.patch
Patch25: update-formats_loacle-and-language.patch
Patch26: fix-cpuinfo-error-of-ukui-control-center-3.1.2.patch
Patch27: ukui-control-center-3.1.2-repair-freelogin-autologin-not-available.patch
Patch28: 0001-fix-object-created-in-wrong-thread.patch
Patch200: fix-build-error-of-libkscreen-qt5-5.27.6.patch
Patch201: fix-build-error-of-clang.patch
Patch202: fix-build-error-of-ddcutil-2.0.0.patch
Patch203: fix-the-display-resolution-does-not-match-the-actual-resolution.patch
BuildRequires: qt5-qtsvg-devel
BuildRequires: gsettings-qt-devel
BuildRequires: glib2-devel
@ -106,7 +110,7 @@ rm -rf $RPM_BUILD_ROOT
mkdir -p %{buildroot}/etc/xdg/autostart/
%post
%posttrans
set -e
glib-compile-schemas /usr/share/glib-2.0/schemas/ &> /dev/null ||:
@ -120,8 +124,6 @@ groupadd nopasswdlogin &> /dev/null ||:
%postun
sed -i "/auth sufficient pam_succeed_if.so user ingroup nopasswdlogin/d" /etc/pam.d/lightdm
%preun
systemctl disable ukui-group-manager.service
systemctl stop ukui-group-manager.service
@ -151,6 +153,27 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Thu Aug 15 2024 huayadong <huayadong@kylinos.cn> - 3.1.2-33
- Type:bugfix
- ID :NA
- SUG :NA
- DESC:Patch203:fix-the-display-resolution-does-not-match-the-actual-resolution.patch
* Tue Jun 25 2024 houhongxun <houhongxun@kylinos.cn> - 3.1.2-32
- fix wrong usage of qthread
* Tue May 28 2024 peijiankang <peijiankang@kylinos.cn> - 3.1.2-31
- Type:bugfix
- ID :NA
- SUG :NA
- DESC:add ukui-control-center-3.1.2-repair-freelogin-autologin-not-available.patch
* Fri May 10 2024 peijiankang <peijiankang@kylinos.cn> - 3.1.2-30
- Type:bugfix
- ID :NA
- SUG :NA
- DESC:add fix-cpuinfo-error-of-ukui-control-center-3.1.2.patch
* Mon Jan 29 2024 peijiankang <peijiankang@kylinos.cn> - 3.1.2-29
- Type:bugfix
- ID :NA