From ebace5234be404a9ece01624b6defce8e7ace621 Mon Sep 17 00:00:00 2001 From: peijiankang Date: Fri, 15 Sep 2023 17:22:16 +0800 Subject: [PATCH] sync 23.09 to 22.03 (cherry picked from commit 5f3a90b6fc67e5cb4e2a2f62cc22ed1df7f97517) --- ...off-activation-button-hide-operation.patch | 38 ++ add-information-for-about.patch | 490 ++++++++++++++++++ add-ukcc-setlang.patch | 99 ++++ cpuinfo-in-arm-system-is-null.patch | 65 +++ disable-Time-to-sleep-of-kylin.patch | 58 +++ fix-build-error-of-clang.patch | 12 + fix-changeusertype-error.patch | 51 ++ ukui-control-center.spec | 58 ++- 8 files changed, 864 insertions(+), 7 deletions(-) create mode 100644 Turn-off-activation-button-hide-operation.patch create mode 100644 add-information-for-about.patch create mode 100644 add-ukcc-setlang.patch create mode 100644 cpuinfo-in-arm-system-is-null.patch create mode 100644 disable-Time-to-sleep-of-kylin.patch create mode 100644 fix-build-error-of-clang.patch create mode 100644 fix-changeusertype-error.patch diff --git a/Turn-off-activation-button-hide-operation.patch b/Turn-off-activation-button-hide-operation.patch new file mode 100644 index 0000000..8b65853 --- /dev/null +++ b/Turn-off-activation-button-hide-operation.patch @@ -0,0 +1,38 @@ +From 582a7b5cfa58e1036b4a60b9d651c50d5da6fd00 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Mon, 19 Jun 2023 17:03:10 +0800 +Subject: [PATCH] Turn off activation button hide operation + +--- + plugins/system/about/about.cpp | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/plugins/system/about/about.cpp b/plugins/system/about/about.cpp +index 3917b6b..3d474fa 100644 +--- a/plugins/system/about/about.cpp ++++ b/plugins/system/about/about.cpp +@@ -50,6 +50,8 @@ + #include + #include + ++#include "../../../shell/utils/utils.h" ++ + About::About() : mFirstLoad(true) + { + pluginName = tr("About"); +@@ -683,8 +685,10 @@ void About::setupSerialComponent() + } + mSequenceLabel_2->setText(serial); + mSequenceLabel_2->setStyleSheet("color : #2FB3E8"); +- if (serial.isEmpty()) +- mActivationBtn->hide(); ++ if(Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){ ++ if (serial.isEmpty()) ++ mActivationBtn->hide(); ++ } + if (status == 0) { //未激活 激活或未激活应通过status判断 + if (!trial_dateRes.isEmpty()) { //试用期 + mStatusLabel_2->setText(tr("Inactivated")); +-- +2.33.0 + diff --git a/add-information-for-about.patch b/add-information-for-about.patch new file mode 100644 index 0000000..a91a86a --- /dev/null +++ b/add-information-for-about.patch @@ -0,0 +1,490 @@ +From 9c4097314c5e50eca8042ec8b846a0eb53e1f171 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Wed, 21 Jun 2023 16:59:26 +0800 +Subject: [PATCH] add information for about + +--- + plugins/system/about/about.cpp | 115 +++++++++++++++++++++++-------- + plugins/system/about/about.h | 2 + + shell/res/i18n/zh_CN.ts | 122 +++++++++++++++++++++------------ + 3 files changed, 165 insertions(+), 74 deletions(-) + +diff --git a/plugins/system/about/about.cpp b/plugins/system/about/about.cpp +index 3d474fa..4d6af71 100644 +--- a/plugins/system/about/about.cpp ++++ b/plugins/system/about/about.cpp +@@ -470,6 +470,15 @@ void About::initUI(QWidget *widget) + QString currentyear("2023"); + mTipLabel = new FixLabel(QString(tr("Copyright © 2009-%1 KylinSoft. All rights reserved.")).arg(currentyear) , Aboutwidget); + mTipLabel->setContentsMargins(16 , 0 , 0 , 0); ++ ++ if(!Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){//kylin ++ mKindLabel = new FixLabel(QString(tr("Kind reminder: If you have any questions, please consult sales\n" ++ "Consultation hotline: 400-089-1870")), Aboutwidget); ++ mKindLabel->setContentsMargins(16 , 0 , 0 , 0); ++ ++ mWebLabel = new FixLabel(QString(tr("Company website: https://www.kylinos.cn")), Aboutwidget); ++ mWebLabel->setContentsMargins(16 , 0 , 0 , 0); ++ } + + mBtnFrame = new QFrame(Aboutwidget); + mBtnFrame->setMinimumSize(QSize(550, 0)); +@@ -543,7 +552,13 @@ void About::initUI(QWidget *widget) + + AboutLayout->addWidget(mInformationFrame); + AboutLayout->addWidget(mActivationFrame); +- AboutLayout->addWidget(mTipLabel); ++ if(!Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){//kylin ++ AboutLayout->addWidget(mKindLabel); ++ AboutLayout->addWidget(mTipLabel); ++ AboutLayout->addWidget(mWebLabel); ++ }else{ ++ AboutLayout->addWidget(mTipLabel); ++ } + item = new QSpacerItem(10 , 32); + AboutLayout->addSpacerItem(item); + // AboutLayout->addSpacing(32); +@@ -683,36 +698,74 @@ void About::setupSerialComponent() + if (trial_dateReply.type() == QDBusMessage::ReplyMessage) { + trial_dateRes = trial_dateReply.arguments().at(0).toString(); + } +- mSequenceLabel_2->setText(serial); +- mSequenceLabel_2->setStyleSheet("color : #2FB3E8"); +- if(Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){ ++ if(Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){//社区 ++ mSequenceLabel_2->setText(serial); ++ mSequenceLabel_2->setStyleSheet("color : #2FB3E8"); + if (serial.isEmpty()) + mActivationBtn->hide(); +- } +- if (status == 0) { //未激活 激活或未激活应通过status判断 +- if (!trial_dateRes.isEmpty()) { //试用期 +- mStatusLabel_2->setText(tr("Inactivated")); +- mStatusLabel_2->setStyleSheet("color : red "); +- mTimeLabel_1->setText(tr("Trial expiration time")); +- mTimeLabel_2->setText(trial_dateRes); +- mActivationBtn->setText(tr("Active")); +- activestatus = false; +- } else { +- mTimeLabel_1->hide(); +- mTimeLabel_2->hide(); +- mStatusLabel_2->setText(tr("Inactivated")); +- mStatusLabel_2->setStyleSheet("color : red "); +- mActivationBtn->setText(tr("Active")); +- } +- } else { //已激活 +- mActivationBtn->hide(); +- mTrialLabel->hide(); +- mAndLabel->hide(); +- mStatusLabel_2->setStyleSheet(""); +- mStatusLabel_2->setText(tr("Activated")); +- mTimeLabel_2->setText(dateRes); +- mActivationBtn->setText(tr("Extend")); +- mActivationBtn->show(); ++ if (status == 0) { //未激活 激活或未激活应通过status判断 ++ if (!trial_dateRes.isEmpty()) { //试用期 ++ mStatusLabel_2->setText(tr("Inactivated")); ++ mStatusLabel_2->setStyleSheet("color : red "); ++ mTimeLabel_1->setText(tr("Trial expiration time")); ++ mTimeLabel_2->setText(trial_dateRes); ++ mActivationBtn->setText(tr("Active")); ++ activestatus = false; ++ } else { ++ mTimeLabel_1->hide(); ++ mTimeLabel_2->hide(); ++ mStatusLabel_2->setText(tr("Inactivated")); ++ mStatusLabel_2->setStyleSheet("color : red "); ++ mActivationBtn->setText(tr("Active")); ++ } ++ } else { //已激活 ++ mActivationBtn->hide(); ++ mTrialLabel->hide(); ++ mAndLabel->hide(); ++ mStatusLabel_2->setStyleSheet(""); ++ mStatusLabel_2->setText(tr("Activated")); ++ mTimeLabel_2->setText(dateRes); ++ mActivationBtn->setText(tr("Extend")); ++ mActivationBtn->show(); ++ } ++ }else{//kylin ++ if (status == 0) { //未激活 激活或未激活应通过status判断 ++ if (!trial_dateRes.isEmpty()) { //试用期 ++ mStatusLabel_2->setText(tr("Inactivated")); ++ mStatusLabel_2->setStyleSheet("color : red "); ++ mTimeLabel_1->setText(tr("Trial expiration time")); ++ mTimeLabel_2->setText(trial_dateRes); ++ mActivationBtn->setText(tr("Active")); ++ activestatus = false; ++ } else { ++ mStatusLabel_2->setText(tr("Inactivated")); ++ mStatusLabel_2->setStyleSheet("color : red "); ++ mTimeLabel_1->setText(tr("Trial expiration time")); ++ mTimeLabel_2->setText(tr("Unknow")); ++ mActivationBtn->setText(tr("Active")); ++ } ++ } else { //已激活 ++ mActivationBtn->hide(); ++ mTrialLabel->hide(); ++ mAndLabel->hide(); ++ mStatusLabel_2->setStyleSheet(""); ++ mStatusLabel_2->setText(tr("Activated")); ++ mTimeLabel_1->setText(tr("Service expiration time")); ++ mTimeLabel_2->setText(dateRes); ++ mActivationBtn->setText(tr("Extend")); ++ mActivationBtn->show(); ++ } ++ if (serial.isEmpty()){ ++ mTimeLabel_1->hide(); ++ mTimeLabel_2->hide(); ++ mSequenceLabel_2->setText(tr("Unknow")); ++ mSequenceLabel_2->setStyleSheet("color : #2FB3E8"); ++ }else{ ++ mTimeLabel_1->show(); ++ mTimeLabel_2->show(); ++ mSequenceLabel_2->setText(serial); ++ mSequenceLabel_2->setStyleSheet("color : #2FB3E8"); ++ } + } + connect(mActivationBtn, &QPushButton::clicked, this, &About::runActiveWindow); + } +@@ -995,6 +1048,10 @@ void About::setupSystemVersion() + mAgreeLabel->hide(); + mActivationFrame->hide(); + mTipLabel->hide(); ++ if(!Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){//kylin ++ mKindLabel->hide(); ++ mWebLabel->hide(); ++ } + mTrialLabel->hide(); + } + +diff --git a/plugins/system/about/about.h b/plugins/system/about/about.h +index c2571ac..c2d44a3 100644 +--- a/plugins/system/about/about.h ++++ b/plugins/system/about/about.h +@@ -169,7 +169,9 @@ private: + QLabel *mHpLabel; + FixLabel *mEducateIconLabel; + QLabel *mEducateLabel; ++ FixLabel *mKindLabel; + FixLabel *mTipLabel; ++ FixLabel *mWebLabel; + + + +diff --git a/shell/res/i18n/zh_CN.ts b/shell/res/i18n/zh_CN.ts +index db8f2f2..8d6b862 100644 +--- a/shell/res/i18n/zh_CN.ts ++++ b/shell/res/i18n/zh_CN.ts +@@ -4,94 +4,106 @@ + + About + +- ++ + System Summary + 系统概述 + + +- ++ + Support + 支持 + + +- +- ++ ++ + Version Number + 版本号 + + +- ++ + Status + 系统状态 + /About/Status + + +- ++ + DateRes + 服务到期时间 + + +- ++ + Wechat code scanning obtains HP professional technical support + 微信扫码获得HP专业技术支持 + + +- ++ + HostName + 计算机名 + + +- ++ + See more about Kylin Tianqi edu platform + 查看麒麟天启教育平台更多信息 + + +- ++ + <<Protocol>> + 《试用免责协议》 + + +- ++ + InterVersion + 内部版本 + + +- ++ + Privacy and agreement + 隐私和协议 + + +- ++ + Send optional diagnostic data + 发送可选诊断数据 + + +- ++ + By sending us diagnostic data, improve the system experience and solve your problems faster + 通过向我们发送诊断数据,提升系统体验以及更快的解决你的问题 + + +- ++ ++ Kind reminder: If you have any questions, please consult sales ++Consultation hotline: 400-089-1870 ++ 温馨提示:如有问题请咨询销售 ++咨询电话:400-089-1870 ++ ++ ++ + Copyright © 2009-%1 KylinSoft. All rights reserved. + 版权所有 © 2009-%1 麒麟软件 保留所有权利。 + + +- ++ ++ Company website: https://www.kylinos.cn ++ 公司网站:https://www.kylinos.cn ++ ++ ++ + and + + + +- ++ + <<Privacy>> + 《用户隐私协议》 + + +- ++ + Learn more HP user manual>> + 了解更多 Hp用户手册>> + + +- ++ + See user manual>> + 查看用户手册 + +@@ -100,34 +112,48 @@ + 未激活(试用期) + + +- ++ ++ ++ + Trial expiration time + 试用到期时间 + + +- +- ++ ++ ++ Unknow ++ 未知 ++ ++ ++ ++ + expired + 已过期 + + +- +- ++ ++ Service expiration time ++ 服务到期时间 ++ ++ ++ ++ ++ + Extend + 延长服务 + + +- ++ + The system needs to be restarted to set the HostName, whether to reboot + 计算机名已被修改,需要重启系统才可正常使用。建议立即重启系统! + + +- ++ + Reboot Now + 立即重启 + + +- ++ + Reboot Later + 稍后重启 + +@@ -140,9 +166,9 @@ + 延长服务 + + +- +- +- ++ ++ ++ + avaliable + 可用 + +@@ -159,7 +185,7 @@ + 版权所有2009-2021@kylinos保留所有权利 + + +- ++ + Version + 版本名称 + /About/version +@@ -177,37 +203,37 @@ + 版权所有 © 2009-2021 麒麟软件 保留所有权利。 + + +- ++ + Kernel + 内核 + /About/Kernel + + +- ++ + CPU + CPU + /About/CPU + + +- ++ + Memory + 内存 + /About/Memory + + +- +- ++ ++ + Disk + 硬盘 + + +- ++ + Desktop + 桌面 + /About/Desktop + + +- ++ + User + 用户名 + /About/User +@@ -221,7 +247,7 @@ + 有效期 + + +- ++ + Serial + 序列号 + +@@ -234,8 +260,10 @@ + 序列号 + + +- +- ++ ++ ++ ++ + Active + 激活 + +@@ -252,7 +280,7 @@ + 关于 + + +- ++ + About + 关于 + +@@ -269,13 +297,16 @@ + 可用 + + +- +- ++ ++ ++ ++ + Inactivated + 未激活 + + +- ++ ++ + Activated + 已激活 + +@@ -418,6 +449,7 @@ + AddBtn + + ++ + Add + 添加 + +-- +2.33.0 + diff --git a/add-ukcc-setlang.patch b/add-ukcc-setlang.patch new file mode 100644 index 0000000..1cacac3 --- /dev/null +++ b/add-ukcc-setlang.patch @@ -0,0 +1,99 @@ +From 19bc5d463a5a3ea11961b999982eb033cea532b6 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Thu, 29 Jun 2023 10:38:35 +0800 +Subject: [PATCH] add ukcc-setlang + +--- + plugins/time-language/area/area.cpp | 9 ++++++++- + plugins/time-language/area/area.pro | 5 ++++- + plugins/time-language/area/ukcc-setlang.sh | 15 +++++++++++++++ + 3 files changed, 27 insertions(+), 2 deletions(-) + create mode 100644 plugins/time-language/area/ukcc-setlang.sh + +diff --git a/plugins/time-language/area/area.cpp b/plugins/time-language/area/area.cpp +index 15e5b8e..a6b6bf7 100644 +--- a/plugins/time-language/area/area.cpp ++++ b/plugins/time-language/area/area.cpp +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include "languageFrame.h" + #include "../../../shell/component/Frame/hlineframe.h" + +@@ -202,12 +203,16 @@ void Area::initLanguage() + connect(chineseFrame, &LanguageFrame::clicked, this, [=](){ + englishFrame->showSelectedIcon(false); + m_areaInterface->call("SetLanguage","zh_CN.UTF-8"); ++ QString cmdtest = QString("bash /usr/bin/ukcc-setlang.sh %1").arg("zh_CN.UTF-8"); ++ QProcess::execute (cmdtest); + showMessageBox(2); + }); + + connect(englishFrame, &LanguageFrame::clicked, this, [=](){ + chineseFrame->showSelectedIcon(false); + m_areaInterface->call("SetLanguage","en_US.UTF-8"); ++ QString cmdtest = QString("bash /usr/bin/ukcc-setlang.sh %1").arg("en_US.UTF-8"); ++ QProcess::execute (cmdtest); + showMessageBox(2); + }); + } +@@ -341,11 +346,13 @@ QStringList Area::getUserDefaultLanguage() { + propertyMap = reply.value(); + if (propertyMap.keys().contains("FormatsLocale")) { + formats = propertyMap.find("FormatsLocale").value().toString(); ++ if(formats.isEmpty()) ++ formats = QLocale::system().name()+ ".UTF-8"; + } + if(language.isEmpty() && propertyMap.keys().contains("Language")) { + language = propertyMap.find("Language").value().toString(); + if(language.isEmpty()) +- language = QLocale::system().name()+ ".UTF-8"; ++ language = QLocale::system().name()+ ".UTF-8"; + } + } else { + qDebug() << "reply failed"; +diff --git a/plugins/time-language/area/area.pro b/plugins/time-language/area/area.pro +index 1fb2fa0..a8df728 100644 +--- a/plugins/time-language/area/area.pro ++++ b/plugins/time-language/area/area.pro +@@ -17,10 +17,13 @@ include(../../../shell/component/ImageUtil/imageutil.pri) + include(../../../shell/component/AddBtn/addbtn.pri) + include(../../../shell/component/Label/label.pri) + ++setlang.files = $$PWD/ukcc-setlang.sh ++setlang.path = /usr/bin/ ++ + TARGET = $$qtLibraryTarget(area) + DESTDIR = ../.. + target.path = $${PLUGIN_INSTALL_DIRS} +-INSTALLS += target ++INSTALLS += target setlang + + LIBS += -L$$[QT_INSTALL_DIRS] -lgsettings-qt + +diff --git a/plugins/time-language/area/ukcc-setlang.sh b/plugins/time-language/area/ukcc-setlang.sh +new file mode 100644 +index 0000000..67413f7 +--- /dev/null ++++ b/plugins/time-language/area/ukcc-setlang.sh +@@ -0,0 +1,15 @@ ++#!/bin/sh ++ ++language_name=$1 ++ ++touch ~/.bash_profile || exit 1 ++ ++grep -rin "LANG=" ~/.bash_profile ++ ++result=$? ++ ++if [ $result -eq 0 ];then ++ sed -i "s/LANG=.*/LANG=\"$language_name\"/g" ~/.bash_profile ++else ++ echo "LANG=\"$locale_name\"" >> ~/.bash_profile ++fi +-- +2.33.0 + diff --git a/cpuinfo-in-arm-system-is-null.patch b/cpuinfo-in-arm-system-is-null.patch new file mode 100644 index 0000000..fdd649a --- /dev/null +++ b/cpuinfo-in-arm-system-is-null.patch @@ -0,0 +1,65 @@ +From 48d56e7ed801ec81bb287190690e0f23decc8299 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Wed, 21 Jun 2023 17:34:27 +0800 +Subject: [PATCH] cpuinfo in arm system is null + +--- + shell/utils/utils.cpp | 40 ++++++++++++++++------------------------ + 1 file changed, 16 insertions(+), 24 deletions(-) + +diff --git a/shell/utils/utils.cpp b/shell/utils/utils.cpp +index 1d61dac..7e418f5 100644 +--- a/shell/utils/utils.cpp ++++ b/shell/utils/utils.cpp +@@ -57,32 +57,24 @@ 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()) { +- return "Unknown"; +- } +- modelLine = modelLineWayland; ++ QString result = ""; ++ QProcess process; ++ process.start("lscpu"); ++ process.waitForFinished(); ++ QString output = process.readAll(); ++ QStringList outputlist = output.split("\n"); ++ ++ for (QString str : outputlist) { ++ if (str.contains("型号名称")){ ++ result = QString(str).right(str.length() - 28); ++ break; ++ } ++ else if(str.contains("Model name")) { ++ result = QString(str).right(str.length() - 33); ++ break; + } +- +- +- int count = lines.filter(QRegularExpression("^processor")).count(); +- +- QString result; +- result.append(modelLine.first().split(':').at(1)); +- result = result.trimmed(); +- +- return result; + } +- +- return QString(); ++ return result; + } + + +-- +2.33.0 + diff --git a/disable-Time-to-sleep-of-kylin.patch b/disable-Time-to-sleep-of-kylin.patch new file mode 100644 index 0000000..9fe3373 --- /dev/null +++ b/disable-Time-to-sleep-of-kylin.patch @@ -0,0 +1,58 @@ +From 6228f293811cb8e37dc55af92372e81838cb38ad Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Sun, 18 Jun 2023 11:36:28 +0800 +Subject: [PATCH] disable Time to sleep of kylin + +--- + plugins/system/power/power.cpp | 4 ++++ + shell/utils/utils.cpp | 10 ++++++++++ + shell/utils/utils.h | 1 + + 3 files changed, 14 insertions(+) + +diff --git a/plugins/system/power/power.cpp b/plugins/system/power/power.cpp +index 62aae31..ee61ceb 100644 +--- a/plugins/system/power/power.cpp ++++ b/plugins/system/power/power.cpp +@@ -535,6 +535,10 @@ void Power::InitUI(QWidget *widget) + mverticalLayout->addStretch(); + + retranslateUi(); ++ if(!Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){ ++ mSleepLabel->hide(); ++ mSleepComboBox->hide(); ++ } + } + + void Power::retranslateUi() +diff --git a/shell/utils/utils.cpp b/shell/utils/utils.cpp +index 24d5f56..d61994e 100644 +--- a/shell/utils/utils.cpp ++++ b/shell/utils/utils.cpp +@@ -264,3 +264,13 @@ bool Utils::isZJY() + } + return true; + } ++ ++QString Utils::getCommunity() ++{ ++ QString filename = "/etc/os-release"; ++ QSettings osSettings(filename, QSettings::IniFormat); ++ ++ QString versionID = osSettings.value("ID").toString(); ++ ++ return versionID; ++} +diff --git a/shell/utils/utils.h b/shell/utils/utils.h +index c905ff4..71fb3bd 100644 +--- a/shell/utils/utils.h ++++ b/shell/utils/utils.h +@@ -49,5 +49,6 @@ namespace Utils + bool isTablet(); + bool isZJY(); + QString getHostName(); ++ QString getCommunity(); + } + #endif // UTILS_H +-- +2.33.0 + diff --git a/fix-build-error-of-clang.patch b/fix-build-error-of-clang.patch new file mode 100644 index 0000000..85a54cb --- /dev/null +++ b/fix-build-error-of-clang.patch @@ -0,0 +1,12 @@ +diff -u -r ukui-control-center-3.1.2/shell/mainwindow.cpp ukui-control-center-3.1.2/shell/mainwindow.cpp +--- ukui-control-center-3.1.2/shell/mainwindow.cpp 2023-04-03 13:52:30.000000000 +0800 ++++ ukui-control-center-3.1.2/shell/mainwindow.cpp 2023-06-17 23:00:33.000000000 +0800 +@@ -724,7 +724,7 @@ + "QPushButton:pressed{background-color:%2;border-radius: 6px;}").arg(hoverColor).arg(clickColor)); + } + +- connect(qtSettings, &QGSettings::changed, this, [=,&hoverColor](const QString &key) { ++ connect(qtSettings, &QGSettings::changed, this, [=](const QString &key) { + if (key == "styleName") { + iconBtn->reLoadIcon(); + hoverColor = this->pluginBtnHoverColor(qtSettings->get("style-name").toString(), true); diff --git a/fix-changeusertype-error.patch b/fix-changeusertype-error.patch new file mode 100644 index 0000000..3a45cdd --- /dev/null +++ b/fix-changeusertype-error.patch @@ -0,0 +1,51 @@ +From 01afac8a63b6ab603d920a5296ffefbc6f5245ba Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Fri, 30 Jun 2023 16:36:43 +0800 +Subject: [PATCH] fix changeusertype error + +--- + plugins/account/userinfo/changeusertype.cpp | 21 +++++---------------- + 1 file changed, 5 insertions(+), 16 deletions(-) + +diff --git a/plugins/account/userinfo/changeusertype.cpp b/plugins/account/userinfo/changeusertype.cpp +index 8ec8f6b..a36f2e7 100644 +--- a/plugins/account/userinfo/changeusertype.cpp ++++ b/plugins/account/userinfo/changeusertype.cpp +@@ -25,17 +25,10 @@ ChangeUserType::ChangeUserType(QString objpath, QWidget *parent) : + setMinimumSize(QSize(520, 390)); + setWindowTitle(tr("UserType")); + +- if (Utils::isCommunity()) { +- cutiface = new QDBusInterface("com.control.center.qt.systemdbus", +- "/", +- "com.control.center.interface", +- QDBusConnection::systemBus()); +- } else { +- cutiface = new QDBusInterface("org.freedesktop.Accounts", +- _objpath, +- "org.freedesktop.Accounts.User", +- QDBusConnection::systemBus()); +- } ++ cutiface = new QDBusInterface("org.freedesktop.Accounts", ++ _objpath, ++ "org.freedesktop.Accounts.User", ++ QDBusConnection::systemBus()); + + initUI(); + setConnect(); +@@ -190,11 +183,7 @@ void ChangeUserType::setConnect(){ + close(); + }); + connect(cutConfirmBtn, &QPushButton::clicked, this, [=]{ +- if (Utils::isCommunity()) { +- cutiface->call("SetAccountType", _objpath, cutTypesBtnGroup->checkedId()); +- } else { +- cutiface->call("SetAccountType", cutTypesBtnGroup->checkedId()); +- } ++ cutiface->call("SetAccountType", cutTypesBtnGroup->checkedId()); + + accept(); + }); +-- +2.33.0 + diff --git a/ukui-control-center.spec b/ukui-control-center.spec index c5fca1b..d700d9a 100644 --- a/ukui-control-center.spec +++ b/ukui-control-center.spec @@ -1,6 +1,6 @@ Name: ukui-control-center Version: 3.1.2 -Release: 19 +Release: 26 Summary: utilities to configure the UKUI desktop License: GPL-2+ URL: http://www.ukui.org @@ -20,7 +20,15 @@ Patch15: fix-changeOtherUserPasswd-critical-vulnerabilities.patch Patch16: fix-createuser-critical-vulnerabilities.patch Patch17: ukui-control-center-3.1.2-fix-password-changes-for-this-user-and-for-other-use.patch Patch18: fix-ukui-control-center-3.1.2-activation-button-display-error.patch +Patch19: disable-Time-to-sleep-of-kylin.patch +Patch20: Turn-off-activation-button-hide-operation.patch +Patch21: add-information-for-about.patch +Patch22: cpuinfo-in-arm-system-is-null.patch +Patch23: add-ukcc-setlang.patch +Patch24: fix-changeusertype-error.patch +#Patch200: fix-build-error-of-libkscreen-qt5-5.27.6.patch +Patch201: fix-build-error-of-clang.patch BuildRequires: qt5-qtsvg-devel BuildRequires: gsettings-qt-devel BuildRequires: glib2-devel @@ -58,13 +66,11 @@ BuildRequires: kf5-kguiaddons-devel Requires: dconf Requires: ukui-search -Requires: kylin-nm -Requires: ukui-bluetooth Requires: ukui-media Requires: ukui-themes #install need but control is not exist Requires: libkylin-chkname1 - +Requires: lightdm Suggests: gsettings-desktop-schemas Suggests: mate-common @@ -110,11 +116,10 @@ systemctl start ukui-group-manager.service sed -i "1iauth sufficient pam_succeed_if.so user ingroup nopasswdlogin" /etc/pam.d/lightdm groupadd nopasswdlogin &> /dev/null ||: -gsettings set org.ukui.power-manager sleep-computer-battery 0 &> /dev/null ||: -gsettings set org.ukui.power-manager sleep-computer-ac 0 &> /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 @@ -144,6 +149,45 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Sep 15 2023 peijiankang - 3.1.2-26 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: add add-information-for-about.patch cpuinfo-in-arm-system-is-null.patch add-ukcc-setlang.patch fix-changeusertype-error.patch + +* Fri Sep 08 2023 yoo - 3.1.2-25 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: fix clang build error + +* Thu Sep 07 2023 douyan - 3.1.2-24 +- Type:Bugfix +- ID:NA +- SUG:NA +- DESC: add Turn-off-activation-button-hide-operation.patch + +* Wed Aug 30 2023 huayadong - 3.1.2-23 +- Type:bugfix +- ID:#I7WGWQ +- SUG:NA +- DESC:fix Abnormal information during installation and uninstallation + +* Fri Aug 18 2023 douyan - 3.1.2-22 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: rebuild + +* Sun Jun 18 2023 peijiankang - 3.1.2-21 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: add disable-Time-to-sleep-of-kylin.patch + +* Sat Jun 17 2023 huayadong - 3.1.2-20 +- remove Requires: kylin-nm ukui-bluetooth + * Wed Jun 14 2023 huayadong - 3.1.2-19 - add patch:fix-ukui-control-center-3.1.2-activation-button-display-error.patch