diff --git a/0001-fix-object-created-in-wrong-thread.patch b/0001-fix-object-created-in-wrong-thread.patch new file mode 100644 index 0000000000000000000000000000000000000000..2a51bdb9734c5a40c1d56c0ec2423c21e60e0316 --- /dev/null +++ b/0001-fix-object-created-in-wrong-thread.patch @@ -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?= +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: 侯红勋 +--- + 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 + diff --git a/fix-cpuinfo-error-of-ukui-control-center-3.1.2.patch b/fix-cpuinfo-error-of-ukui-control-center-3.1.2.patch new file mode 100644 index 0000000000000000000000000000000000000000..897c77044c6ef92bef3dc22cc94e4af9da475e8c --- /dev/null +++ b/fix-cpuinfo-error-of-ukui-control-center-3.1.2.patch @@ -0,0 +1,77 @@ +From 67187a2ac22acad835b8e78a5007a77776c34742 Mon Sep 17 00:00:00 2001 +From: peijiankang +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 + diff --git a/fix-the-display-resolution-does-not-match-the-actual-resolution.patch b/fix-the-display-resolution-does-not-match-the-actual-resolution.patch new file mode 100644 index 0000000000000000000000000000000000000000..adbcb83ac692bc626702eb16e6ded8954789280c --- /dev/null +++ b/fix-the-display-resolution-does-not-match-the-actual-resolution.patch @@ -0,0 +1,26 @@ +From 154ef4cd4ba90888c467d00a91337764628538ca Mon Sep 17 00:00:00 2001 +From: huayadong +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 + diff --git a/ukui-control-center-3.1.2-repair-freelogin-autologin-not-available.patch b/ukui-control-center-3.1.2-repair-freelogin-autologin-not-available.patch new file mode 100644 index 0000000000000000000000000000000000000000..7a7af594fa265e0ac24ac5c06a3031c13b5dcb4a --- /dev/null +++ b/ukui-control-center-3.1.2-repair-freelogin-autologin-not-available.patch @@ -0,0 +1,38 @@ +From bb0c313ac7eb6a3f3d99e3ab86b41946feab53aa Mon Sep 17 00:00:00 2001 +From: root +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 ret = tmpSysinterface->call("setAutoLoginStatus", user.objpath, checked); ++ QDBusReply ret = tmpSysinterface->call("setAutoLoginStatus", checked, user.username); + + if (ret == 0) { + autoLoginSBtn->blockSignals(true); +@@ -852,8 +852,9 @@ void UserInfo::setUserConnect(){ + return; + } + +- QDBusReply ret = piface.call("setNoPwdLoginStatus", checked, user.username); +- if (ret == false) { ++ QDBusReply ret = piface.call("setNoPwdLoginStatus", checked, user.username); ++ ++ if (ret == 0) { + nopwdLoginSBtn->blockSignals(true); + nopwdLoginSBtn->setChecked(!checked); + nopwdLoginSBtn->blockSignals(false); +-- +2.33.0 + diff --git a/ukui-control-center.spec b/ukui-control-center.spec index f24fbc4a20e3d1e00d7b638198b337ac5b817f78..e7ddcb4568938b0ccf3a3b01396f062c71a5d710 100644 --- a/ukui-control-center.spec +++ b/ukui-control-center.spec @@ -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 - 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 - 3.1.2-32 +- fix wrong usage of qthread + +* Tue May 28 2024 peijiankang - 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 - 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 - 3.1.2-29 - Type:bugfix - ID :NA