Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
7a5adab057
!76 sync by openEuler-22.03-LTS-SP3
From: @ut-layne-yang 
Reviewed-by: @xzyangha 
Signed-off-by: @xzyangha
2024-06-21 01:52:56 +00:00
liuzhilin
8ff6a6c6d1 update BR 2024-06-19 13:10:12 +08:00
liuzhilin
04adccf558 fix build BR 2024-06-19 13:08:09 +08:00
liuzhilin
afe2e417e4 update dde-control-center package 2024-06-19 13:06:15 +08:00
openeuler-ci-bot
7783463e75
!41 [sync] PR-38: 修复一些已知问题
From: @openeuler-sync-bot 
Reviewed-by: @HelloWorld_lvcongqing 
Signed-off-by: @HelloWorld_lvcongqing
2023-06-08 09:01:47 +00:00
leeffo
09b90ded23 fix: hide commoninfo and end-user-license-agreement
(cherry picked from commit 148a0ecf1e678afd857d725764c6a16ee90cb08a)
2023-06-08 16:03:38 +08:00
openeuler-ci-bot
6095935cc5
!39 [sync] PR-31: fix issue: I6QIOR dde控制中心修改密码缺陷
From: @openeuler-sync-bot 
Reviewed-by: @HelloWorld_lvcongqing 
Signed-off-by: @HelloWorld_lvcongqing
2023-06-08 07:54:12 +00:00
desert-sailor
2302fbc99f bugfix-for-no-check-newpassword-at-modifypwd
(cherry picked from commit deac1e28a5588e8b74cc1ad71e014fe67868fe72)
2023-06-08 15:07:42 +08:00
openeuler-ci-bot
b150135348
!37 [sync] PR-27: update to 5.4.85.4
From: @openeuler-sync-bot 
Reviewed-by: @HelloWorld_lvcongqing 
Signed-off-by: @HelloWorld_lvcongqing
2023-05-08 03:12:03 +00:00
liweiganga
9dd8fe90b6 update: update to 5.4.85.4
(cherry picked from commit 6a1e574453f60bcc0638bbc45969b4fd6d6f90f6)
2023-05-08 09:49:07 +08:00
16 changed files with 2159 additions and 208 deletions

View File

@ -0,0 +1,26 @@
From 2195d2302d073b10a09f1c9c65c02a6bb3ff16fd Mon Sep 17 00:00:00 2001
From: liweigang <liweiganga@uniontech.com>
Date: Thu, 23 Jun 2022 17:22:20 +0800
Subject: [PATCH] fix: modify eulerServerEnduserAgreement_new path
---
src/frame/window/protocolfile.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/frame/window/protocolfile.cpp b/src/frame/window/protocolfile.cpp
index 5a03939..c1a5a39 100644
--- a/src/frame/window/protocolfile.cpp
+++ b/src/frame/window/protocolfile.cpp
@@ -30,7 +30,7 @@ DCORE_USE_NAMESPACE
const static QString serverEnduserAgreement_new = "/usr/share/protocol/enduser-agreement/End-User-License-Agreement-Server-CN-%1.txt";
const static QString serverEnduserAgreement_old = "/usr/share/deepin-deepinid-client/privacy/End-User-License-Agreement-Server/End-User-License-Agreement-Server-CN-%1.txt";
-const static QString eulerServerEnduserAgreement_new = "/usr/share/protocol/enduser-agreement/End-User-License-Agreement-Server-Euler-%1.txt";
+const static QString eulerServerEnduserAgreement_new = "/usr/share/protocol/enduser-agreement/End-User-License-Agreement-Server-CN-%1.txt";
const static QString eulerServerEnduserAgreement_old = "/usr/share/deepin-deepinid-client/privacy/End-User-License-Agreement-Server/End-User-License-Agreement-Server-Euler-%1.txt";
const static QString homeEnduserAgreement_new = "/usr/share/protocol/enduser-agreement/End-User-License-Agreement-Home-CN-%1.txt";
const static QString homeEnduserAgreement_old = "/usr/share/deepin-deepinid-client/privacy/End-User-License-Agreement-Home/End-User-License-Agreement-Home-CN-%1.txt";
const static QString professionalEnduserAgreement_new = "/usr/share/protocol/enduser-agreement/End-User-License-Agreement-Professional-CN-%1.txt";
--
2.20.1

31
0001-feat-root.patch Normal file
View File

@ -0,0 +1,31 @@
From 427b261b78aedd9f04f690e20e773bbc9fd60432 Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Sun, 23 Apr 2023 10:14:14 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8E=A7=E5=88=B6=E4=B8=AD=E5=BF=83roo?=
=?UTF-8?q?t=E7=94=A8=E6=88=B7=E6=97=A0=E6=B3=95=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E5=85=B6=E4=BB=96=E7=94=A8=E6=88=B7=E7=9A=84=E5=AF=86=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/frame/modules/accounts/accountsworker.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/frame/modules/accounts/accountsworker.cpp b/src/frame/modules/accounts/accountsworker.cpp
index b57ad5d..a0654e1 100644
--- a/src/frame/modules/accounts/accountsworker.cpp
+++ b/src/frame/modules/accounts/accountsworker.cpp
@@ -532,7 +532,8 @@ void AccountsWorker::deleteUserIcon(User *user, const QString &iconPath)
void AccountsWorker::addUser(const QString &userPath)
{
- if (userPath.contains("User0", Qt::CaseInsensitive) || m_userModel->contains(userPath))
+ //服务器版本需要root用户信息及相关流程
+ if ((!IsServerSystem && userPath.contains("User0", Qt::CaseInsensitive)) || m_userModel->contains(userPath))
return;
AccountsUser *userInter = new AccountsUser(AccountsService, userPath, QDBusConnection::systemBus(), this);
userInter->setSync(false);
--
2.20.1

View File

@ -1,39 +0,0 @@
From 73f60aa7739376cbcc638a505fa153233c705761 Mon Sep 17 00:00:00 2001
From: yangxianzhao <yangxianzhao@uniontech.com>
Date: Thu, 6 Apr 2023 16:19:59 +0800
Subject: [PATCH] Repair user name related prompt information
---
src/frame/window/modules/accounts/accountsdetailwidget.cpp | 2 +-
src/frame/window/modules/accounts/createaccountpage.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/frame/window/modules/accounts/accountsdetailwidget.cpp b/src/frame/window/modules/accounts/accountsdetailwidget.cpp
index b8ad19c..6239de9 100644
--- a/src/frame/window/modules/accounts/accountsdetailwidget.cpp
+++ b/src/frame/window/modules/accounts/accountsdetailwidget.cpp
@@ -297,7 +297,7 @@ void AccountsDetailWidget::initUserInfo(QVBoxLayout *layout)
for (User *user : userList) {
if (userFullName == user->fullname()) {
m_inputLineEdit->setAlert(true);
- m_inputLineEdit->showAlertMessage(tr("The username already exists"), m_inputLineEdit, 2000);
+ m_inputLineEdit->showAlertMessage(tr("The name already exists"), m_inputLineEdit, 2000);
m_inputLineEdit->lineEdit()->selectAll();
return;
}
diff --git a/src/frame/window/modules/accounts/createaccountpage.cpp b/src/frame/window/modules/accounts/createaccountpage.cpp
index 2a43c85..26b623d 100644
--- a/src/frame/window/modules/accounts/createaccountpage.cpp
+++ b/src/frame/window/modules/accounts/createaccountpage.cpp
@@ -477,7 +477,7 @@ bool CreateAccountPage::checkFullname()
for (User *user : userList) {
if (userFullName == user->fullname()) {
m_fullnameEdit->setAlert(true);
- m_fullnameEdit->showAlertMessage(tr("The username already exists"), m_fullnameEdit, 2000);
+ m_fullnameEdit->showAlertMessage(tr("The name already exists"), m_fullnameEdit, 2000);
m_fullnameEdit->lineEdit()->selectAll();
return false;
}
--
2.18.4

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,31 @@
From 8186e031531b6e09e2c633c57d632a73786c6953 Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Wed, 4 Jan 2023 13:27:37 +0800
Subject: [PATCH] dde-control-center uos open activate button for 1050a
---
src/frame/window/modules/systeminfo/nativeinfowidget.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
index 754edd9..7c6c1b5 100644
--- a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
+++ b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
@@ -202,11 +202,12 @@ void NativeInfoWidget::initWidget()
m_authorized->setValue(tr("To be activated"));
m_authorized->setValueForegroundRole(QColor(255, 0, 0));
m_authorized->setButtonText(tr("Activate"));
- if (DSysInfo::uosEditionType() == DSysInfo::UosEnterpriseC) {
+ /*if (DSysInfo::uosEditionType() == DSysInfo::UosEnterpriseC) {
m_authorized->setVisable(false);
} else {
m_authorized->setVisable(true);
- }
+ }*/
+ m_authorized->setVisable(true);
m_kernel = new TitleValueItem(frame);
//~ contents_path /systeminfo/About This PC
--
2.20.1

View File

@ -0,0 +1,50 @@
From 263559ccfd3615ed1f7f733456f73c54ef364101 Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Wed, 1 Feb 2023 13:40:57 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=B3=E9=97=AD=E7=AA=97=E5=8F=A3?=
=?UTF-8?q?=E7=A7=BB=E5=8A=A8=E6=97=B6=E5=90=AF=E7=94=A8=E9=80=8F=E6=98=8E?=
=?UTF-8?q?=E7=89=B9=E6=95=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../window/modules/personalization/personalizationgeneral.cpp | 2 ++
.../window/modules/personalization/personalizationgeneral.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/frame/window/modules/personalization/personalizationgeneral.cpp b/src/frame/window/modules/personalization/personalizationgeneral.cpp
index 13e7b65..137c165 100644
--- a/src/frame/window/modules/personalization/personalizationgeneral.cpp
+++ b/src/frame/window/modules/personalization/personalizationgeneral.cpp
@@ -493,11 +493,13 @@ void PersonalizationGeneral::paintEvent(QPaintEvent *event)
}
}
+#if 0
void PersonalizationGeneral::resizeEvent(QResizeEvent *event)
{
m_windowMovedLabel->setText(QFontMetrics(m_windowMovedLabel->font()).elidedText(m_displayData, Qt::ElideRight, event->size().width() >= 430 ? 500 : 280));
QWidget::resizeEvent(event);
}
+#endif
void PersonalizationGeneral::updateActiveColors(RoundColorWidget *selectedWidget)
{
diff --git a/src/frame/window/modules/personalization/personalizationgeneral.h b/src/frame/window/modules/personalization/personalizationgeneral.h
index b4856bb..00809fa 100644
--- a/src/frame/window/modules/personalization/personalizationgeneral.h
+++ b/src/frame/window/modules/personalization/personalizationgeneral.h
@@ -76,7 +76,9 @@ public:
protected:
void paintEvent(QPaintEvent *event);
+#if 0
void resizeEvent(QResizeEvent *event) override;
+#endif
private:
void updateActiveColors(RoundColorWidget *selectedWidget);
--
2.20.1

View File

@ -0,0 +1,24 @@
From d59f4e1bb7972884eff879f7be6810b2b3310c85 Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Thu, 2 Feb 2023 16:38:14 +0800
Subject: [PATCH] feat: add setVersion
---
src/frame/modules/systeminfo/systeminfowork.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/frame/modules/systeminfo/systeminfowork.cpp b/src/frame/modules/systeminfo/systeminfowork.cpp
index 20b280c..5b1ce99 100644
--- a/src/frame/modules/systeminfo/systeminfowork.cpp
+++ b/src/frame/modules/systeminfo/systeminfowork.cpp
@@ -167,6 +167,7 @@ void SystemInfoWork::activate()
version = QString("%1 %2").arg(DSysInfo::productVersion())
.arg(DSysInfo::productTypeString());
}
+ m_model->setVersion(version);
m_model->setType(QSysInfo::WordSize);
if (m_systemInfo->isValid()) {
--
2.20.1

View File

@ -0,0 +1,34 @@
From 1834aef3bac001345dc6fdf2629022088746f69b Mon Sep 17 00:00:00 2001
From: leeffo <liweiganga@uniontech.com>
Date: Wed, 2 Aug 2023 10:37:41 +0800
Subject: [PATCH] hide commonifo and end-user-license-agreement
---
com.deepin.dde.control-center.gschema.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/com.deepin.dde.control-center.gschema.xml b/com.deepin.dde.control-center.gschema.xml
index b18fa11..784db01 100644
--- a/com.deepin.dde.control-center.gschema.xml
+++ b/com.deepin.dde.control-center.gschema.xml
@@ -39,7 +39,7 @@
<summary>Waiting for sound receipt Wait 1 second by default</summary>
</key>
<key name="hide-module" type="as">
- <default>[]</default>
+ <default>['commoninfo']</default>
<summary>The module to display</summary>
</key>
<key name="show-createuser" type="b">
@@ -748,7 +748,7 @@
<description>default is true</description>
</key>
<key name="end-user-license-agreement" type="b">
- <default>true</default>
+ <default>false</default>
<summary></summary>
<description>default is true</description>
</key>
--
2.20.1

View File

@ -0,0 +1,129 @@
From 778442f97f0af8631980f4dc75ee264c448b8d6e Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Thu, 16 Feb 2023 14:48:33 +0800
Subject: [PATCH] dde-control-center uos add Free license
---
include/widgets/utils.h | 3 ++-
src/frame/modules/systeminfo/systeminfomodel.h | 3 ++-
src/frame/window/modules/systeminfo/nativeinfowidget.cpp | 4 ++++
translations/dde-control-center_zh_CN.ts | 7 ++++++-
translations/dde-control-center_zh_HK.ts | 7 ++++++-
translations/dde-control-center_zh_TW.ts | 7 ++++++-
6 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/include/widgets/utils.h b/include/widgets/utils.h
index 1387ada..45debcc 100644
--- a/include/widgets/utils.h
+++ b/include/widgets/utils.h
@@ -39,7 +39,8 @@ enum UiActiveState {
Authorized, //已授权
AuthorizedLapse, //授权失效
TrialAuthorized, //试用期已授权
- TrialExpired //试用期已过期
+ TrialExpired, //试用期已过期
+ FreeLicenseAuthorized = 5 //商业免费授权
};
inline bool isFileExist(const QString &path){
diff --git a/src/frame/modules/systeminfo/systeminfomodel.h b/src/frame/modules/systeminfo/systeminfomodel.h
index 8cdb1fa..401c76f 100644
--- a/src/frame/modules/systeminfo/systeminfomodel.h
+++ b/src/frame/modules/systeminfo/systeminfomodel.h
@@ -19,7 +19,8 @@ enum ActiveState {
Authorized, //已授权
AuthorizedLapse, //授权失效
TrialAuthorized, //试用期已授权
- TrialExpired //试用期已过期
+ TrialExpired, //试用期已过期
+ FreeLicenseAuthorized = 5 //商业免费授权
};
class SystemInfoModel : public QObject
diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
index 7c6c1b5..771bb57 100644
--- a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
+++ b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
@@ -357,6 +357,10 @@ void NativeInfoWidget::setLicenseState(ActiveState state)
m_authorized->setValue(tr("Trial expired"));
m_authorized->setValueForegroundRole(QColor(255, 87, 54));
m_authorized->setButtonText(tr("Activate"));
+ } else if (state == FreeLicenseAuthorized) {
+ m_authorized->setValue(tr("Free license"));
+ m_authorized->setValueForegroundRole(QColor(21, 187, 24));
+ m_authorized->setButtonText(tr("View"));
}
}
diff --git a/translations/dde-control-center_zh_CN.ts b/translations/dde-control-center_zh_CN.ts
index 2ce90ac..3d5e66b 100644
--- a/translations/dde-control-center_zh_CN.ts
+++ b/translations/dde-control-center_zh_CN.ts
@@ -4511,6 +4511,11 @@
<source>Activate</source>
<translation>激活</translation>
</message>
+ <message>
+ <location filename="../src/frame/window/modules/systeminfo/nativeinfowidget.cpp" line="362"/>
+ <source>Free license</source>
+ <translation>免费授权</translation>
+ </message>
<message>
<location filename="../src/frame/window/modules/systeminfo/nativeinfowidget.cpp" line="214"/>
<source>Kernel</source>
@@ -6488,4 +6493,4 @@ UnionTech Software is committed to research and improve the security, accuracy a
<translation>控制中心提供操作系统的所有设置选项。</translation>
</message>
</context>
-</TS>
\ No newline at end of file
+</TS>
diff --git a/translations/dde-control-center_zh_HK.ts b/translations/dde-control-center_zh_HK.ts
index 9ba8c3a..2adaccd 100644
--- a/translations/dde-control-center_zh_HK.ts
+++ b/translations/dde-control-center_zh_HK.ts
@@ -4511,6 +4511,11 @@
<source>Activate</source>
<translation>啟用</translation>
</message>
+ <message>
+ <location filename="../src/frame/window/modules/systeminfo/nativeinfowidget.cpp" line="362"/>
+ <source>Free license</source>
+ <translation>免費授權</translation>
+ </message>
<message>
<location filename="../src/frame/window/modules/systeminfo/nativeinfowidget.cpp" line="214"/>
<source>Kernel</source>
@@ -6488,4 +6493,4 @@ UnionTech Software is committed to research and improve the security, accuracy a
<translation>控制中心提供操作系統的所有設置選項。</translation>
</message>
</context>
-</TS>
\ No newline at end of file
+</TS>
diff --git a/translations/dde-control-center_zh_TW.ts b/translations/dde-control-center_zh_TW.ts
index 23f6817..de875ec 100644
--- a/translations/dde-control-center_zh_TW.ts
+++ b/translations/dde-control-center_zh_TW.ts
@@ -4511,6 +4511,11 @@
<source>Activate</source>
<translation>啟用</translation>
</message>
+ <message>
+ <location filename="../src/frame/window/modules/systeminfo/nativeinfowidget.cpp" line="362"/>
+ <source>Free license</source>
+ <translation>免費授權</translation>
+ </message>
<message>
<location filename="../src/frame/window/modules/systeminfo/nativeinfowidget.cpp" line="214"/>
<source>Kernel</source>
@@ -6488,4 +6493,4 @@ UnionTech Software is committed to research and improve the security, accuracy a
<translation>《控制中心》提供系統設定選項。</translation>
</message>
</context>
-</TS>
\ No newline at end of file
+</TS>
--
2.20.1

View File

@ -0,0 +1,25 @@
From 9f8b031614a9c29a57dd0ad97ef672453c9e4442 Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Wed, 1 Mar 2023 14:19:19 +0800
Subject: [PATCH] feat: hidden power-press-powerbtn
---
com.deepin.dde.control-center.gschema.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/com.deepin.dde.control-center.gschema.xml b/com.deepin.dde.control-center.gschema.xml
index c6e1d49..58bd4c1 100644
--- a/com.deepin.dde.control-center.gschema.xml
+++ b/com.deepin.dde.control-center.gschema.xml
@@ -212,7 +212,7 @@
<description>default is Enabled</description>
</key>
<key name="power-press-powerbtn" enum="com.deepin.dde.control-center.StatusMode">
- <default>'Enabled'</default>
+ <default>'Hidden'</default>
<summary>change power press powerbtn status</summary>
<description>default is Enabled</description>
</key>
--
2.20.1

View File

@ -0,0 +1,28 @@
From 77e3cdac535359ec5e6f013702653675ab448d80 Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Wed, 8 Mar 2023 11:21:10 +0800
Subject: [PATCH] feat: modify copyright read current year
---
src/frame/window/modules/systeminfo/nativeinfowidget.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
index 771bb57..3ba9b1f 100644
--- a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
+++ b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
@@ -371,9 +371,9 @@ const QString NativeInfoWidget::systemCopyright() const
if (oem_copyright.isEmpty()) {
if (DSysInfo::isCommunityEdition())
- return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2011-%1 Deepin Community").arg(2022);
+ return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2011-%1 Deepin Community").arg(QString(__DATE__).right(4));
else
- return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2019-%1 UnionTech Software Technology Co., LTD").arg(2022);
+ return QApplication::translate("dcc::systeminfo::SystemInfoWidget", "Copyright© 2019-%1 UnionTech Software Technology Co., LTD").arg(QString(__DATE__).right(4));
} else {
return oem_copyright;
}
--
2.20.1

View File

@ -0,0 +1,25 @@
From d9f1a109f90f61dd917ad3ddce5894580086340e Mon Sep 17 00:00:00 2001
From: leeffo <leeffo@yeah.net>
Date: Mon, 12 Jun 2023 15:45:47 +0800
Subject: [PATCH] fix: Array out of bounds causes crash handling
---
src/frame/window/modules/systeminfo/systeminfowidget.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/frame/window/modules/systeminfo/systeminfowidget.cpp b/src/frame/window/modules/systeminfo/systeminfowidget.cpp
index 6313841..0f06271 100644
--- a/src/frame/window/modules/systeminfo/systeminfowidget.cpp
+++ b/src/frame/window/modules/systeminfo/systeminfowidget.cpp
@@ -89,7 +89,7 @@ void SystemInfoWidget::initData()
if (IsServerSystem) {
connect(GSettingWatcher::instance(),
&GSettingWatcher::requestShowSecondMenu, this, [this](int row) {
- if (m_itemList[row].gsettingsName == "editionLicense") {
+ if (m_itemList.size() > row && m_itemList[row].gsettingsName == "editionLicense") {
m_listView->setRowHidden(row, true);
}
});
--
2.20.1

View File

@ -1,32 +1,32 @@
From 6f75016b635f0bdd4867bcad46bdf618f4321a2c Mon Sep 17 00:00:00 2001
From: loong ci <loong_c@yeah.net>
Date: Thu, 4 Aug 2022 17:39:05 +0800
Subject: [PATCH] hide authorized
From 4815b66c57916eaa17fa66d97211db1bc27eb411 Mon Sep 17 00:00:00 2001
From: leeffo <liweiganga@uniontech.com>
Date: Thu, 7 Sep 2023 09:33:11 +0800
Subject: [PATCH] hide activate function
---
src/frame/CMakeLists.txt | 1 +
src/frame/modules/systeminfo/systeminfomodel.cpp | 4 ++++
src/frame/modules/systeminfo/systeminfomodel.h | 12 ++++++++++++
src/frame/modules/systeminfo/systeminfowork.cpp | 6 ++++++
src/frame/modules/systeminfo/systeminfowork.h | 4 ++++
src/frame/modules/update/updatemodel.cpp | 4 ++++
src/frame/modules/update/updatemodel.h | 7 +++++++
src/frame/modules/update/updatework.cpp | 4 ++++
src/frame/modules/update/updatework.h | 4 ++++
.../modules/systeminfo/nativeinfowidget.cpp | 14 ++++++++++++++
.../window/modules/systeminfo/nativeinfowidget.h | 6 ++++++
.../modules/systeminfo/systeminfomodule.cpp | 2 ++
.../window/modules/update/updatectrlwidget.cpp | 16 ++++++++++++++++
.../window/modules/update/updatectrlwidget.h | 2 ++
src/frame/window/modules/update/updatemodule.cpp | 6 +++++-
15 files changed, 91 insertions(+), 1 deletion(-)
src/frame/CMakeLists.txt | 1 +
.../modules/systeminfo/systeminfomodel.cpp | 4 ++++
.../modules/systeminfo/systeminfomodel.h | 12 +++++++++++
.../modules/systeminfo/systeminfowork.cpp | 8 ++++++-
src/frame/modules/systeminfo/systeminfowork.h | 4 ++++
src/frame/modules/update/updatemodel.cpp | 4 ++++
src/frame/modules/update/updatemodel.h | 6 ++++++
src/frame/modules/update/updatework.cpp | 4 ++++
src/frame/modules/update/updatework.h | 4 ++++
.../modules/systeminfo/nativeinfowidget.cpp | 14 +++++++++++++
.../modules/systeminfo/nativeinfowidget.h | 6 ++++++
.../modules/systeminfo/systeminfomodule.cpp | 2 ++
.../modules/update/updatectrlwidget.cpp | 21 ++++++++++++++++++-
.../window/modules/update/updatectrlwidget.h | 6 ++++++
.../window/modules/update/updatemodule.cpp | 4 +++-
15 files changed, 97 insertions(+), 3 deletions(-)
diff --git a/src/frame/CMakeLists.txt b/src/frame/CMakeLists.txt
index d391e05..02cced1 100644
index a5c64d0..288ef7f 100644
--- a/src/frame/CMakeLists.txt
+++ b/src/frame/CMakeLists.txt
@@ -30,6 +30,7 @@ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
endif ()
@@ -28,6 +28,7 @@ endif()
set(DEFINED_LIST
+DISABLE_ACTIVATOR
@ -34,10 +34,10 @@ index d391e05..02cced1 100644
DISABLE_CLOUD_SYNC
DISABLE_SYS_UPDATE
diff --git a/src/frame/modules/systeminfo/systeminfomodel.cpp b/src/frame/modules/systeminfo/systeminfomodel.cpp
index af539b1..78ecebc 100644
index 4965879..3488577 100644
--- a/src/frame/modules/systeminfo/systeminfomodel.cpp
+++ b/src/frame/modules/systeminfo/systeminfomodel.cpp
@@ -60,7 +60,9 @@ SystemInfoModel::SystemInfoModel(QObject *parent)
@@ -39,7 +39,9 @@ SystemInfoModel::SystemInfoModel(QObject *parent)
, m_themeEnabled(false)
, m_updating(false)
, m_type(64)
@ -47,7 +47,7 @@ index af539b1..78ecebc 100644
{
}
@@ -218,6 +220,7 @@ void SystemInfoModel::setKernel(const QString &kernel)
@@ -206,6 +208,7 @@ void SystemInfoModel::setKernel(const QString &kernel)
kernelChanged(kernel);
}
@ -55,7 +55,7 @@ index af539b1..78ecebc 100644
void SystemInfoModel::setLicenseState(ActiveState state)
{
if (m_licenseState != state) {
@@ -225,6 +228,7 @@ void SystemInfoModel::setLicenseState(ActiveState state)
@@ -213,6 +216,7 @@ void SystemInfoModel::setLicenseState(ActiveState state)
Q_EMIT licenseStateChanged(state);
}
}
@ -64,10 +64,10 @@ index af539b1..78ecebc 100644
}
}
diff --git a/src/frame/modules/systeminfo/systeminfomodel.h b/src/frame/modules/systeminfo/systeminfomodel.h
index 30a648e..84c17be 100644
index 401c76f..0c7006c 100644
--- a/src/frame/modules/systeminfo/systeminfomodel.h
+++ b/src/frame/modules/systeminfo/systeminfomodel.h
@@ -34,6 +34,7 @@ namespace systeminfo{
@@ -13,6 +13,7 @@ namespace systeminfo{
// !!! 不要用C++11的前置声明枚举类型这里lupdate命令有个bug具体见
// https://stackoverflow.com/questions/6504902/lupdate-error-qualifying-with-unknown-namespace-class
@ -75,17 +75,17 @@ index 30a648e..84c17be 100644
//授权状态
enum ActiveState {
Unauthorized = 0, //未授权
@@ -42,6 +43,7 @@ enum ActiveState {
TrialAuthorized, //试用期已授权
TrialExpired //试用期已过期
@@ -22,6 +23,7 @@ enum ActiveState {
TrialExpired, //试用期已过期
FreeLicenseAuthorized = 5 //商业免费授权
};
+#endif
class SystemInfoModel : public QObject
{
@@ -64,7 +66,9 @@ public:
QString disk() const { return m_disk;}
@@ -45,7 +47,9 @@ public:
QString kernel() const { return m_kernel;}
QString hostName() const { return m_hostName;}
+#ifndef DISABLE_ACTIVATOR
inline ActiveState licenseState() const { return m_licenseState; }
@ -93,30 +93,30 @@ index 30a648e..84c17be 100644
bool bootDelay() const;
bool themeEnabled() const { return m_themeEnabled; }
@@ -89,7 +93,9 @@ Q_SIGNALS:
@@ -70,7 +74,9 @@ Q_SIGNALS:
void memoryChanged(const QString& memory);
void diskChanged(const QString& disk);
void kernelChanged(const QString& kernel);
+#ifndef DISABLE_ACTIVATOR
void licenseStateChanged(ActiveState state);
+#endif
public Q_SLOTS:
void setBootDelay(bool bootDelay);
@@ -106,7 +112,9 @@ public Q_SLOTS:
void hostNameChanged(const QString& hostName);
void setHostNameChanged(const QString& hostName);
void setHostNameError(const QString& error);
@@ -90,7 +96,9 @@ public Q_SLOTS:
void setMemory(qulonglong totalMemory, qulonglong installedMemory);
void setDisk(qulonglong disk);
void setKernel(const QString &kernel);
+#ifndef DISABLE_ACTIVATOR
void setLicenseState(ActiveState state);
+#endif
void setHostName(const QString& hostName);
private:
bool m_bootDelay;
@@ -126,12 +134,16 @@ private:
QString m_memory;
@@ -112,12 +120,16 @@ private:
QString m_disk;
QString m_kernel;
QString m_hostName;
+#ifndef DISABLE_ACTIVATOR
ActiveState m_licenseState;
+#endif
@ -131,12 +131,12 @@ index 30a648e..84c17be 100644
#endif // SYSTEMINFOMODEL_H
diff --git a/src/frame/modules/systeminfo/systeminfowork.cpp b/src/frame/modules/systeminfo/systeminfowork.cpp
index 39e9d11..d12c82a 100644
index 5b1ce99..e0465d2 100644
--- a/src/frame/modules/systeminfo/systeminfowork.cpp
+++ b/src/frame/modules/systeminfo/systeminfowork.cpp
@@ -98,12 +98,14 @@ SystemInfoWork::SystemInfoWork(SystemInfoModel *model, QObject *parent)
m_dbusGrub->setSync(false, false);
@@ -90,12 +90,14 @@ SystemInfoWork::SystemInfoWork(SystemInfoModel *model, QObject *parent)
m_dbusGrubTheme->setSync(false, false);
m_dbusHostName->setSync(false, false);
+#ifndef DISABLE_ACTIVATOR
if (DSysInfo::isDeepin()) {
@ -149,7 +149,7 @@ index 39e9d11..d12c82a 100644
connect(m_dbusGrub, &GrubDbus::DefaultEntryChanged, m_model, &SystemInfoModel::setDefaultEntry);
connect(m_dbusGrub, &GrubDbus::EnableThemeChanged, m_model, &SystemInfoModel::setThemeEnabled);
@@ -136,7 +138,9 @@ SystemInfoWork::SystemInfoWork(SystemInfoModel *model, QObject *parent)
@@ -139,7 +141,9 @@ SystemInfoWork::SystemInfoWork(SystemInfoModel *model, QObject *parent)
void SystemInfoWork::activate()
{
@ -159,15 +159,15 @@ index 39e9d11..d12c82a 100644
m_model->setDistroID(m_systemInfoInter->distroID());
m_model->setDistroVer(m_systemInfoInter->distroVer());
m_model->setDisk(m_systemInfoInter->diskCap());
@@ -285,6 +289,7 @@ void SystemInfoWork::setBackground(const QString &path)
});
@@ -320,6 +324,7 @@ void SystemInfoWork::setBackground(const QString &path)
#endif
}
+#ifndef DISABLE_ACTIVATOR
void SystemInfoWork::showActivatorDialog()
{
QDBusInterface activator("com.deepin.license.activator",
@@ -303,6 +308,7 @@ void SystemInfoWork::licenseStateChangeSlot()
@@ -338,6 +343,7 @@ void SystemInfoWork::licenseStateChangeSlot()
QFuture<void> future = QtConcurrent::run(this, &SystemInfoWork::getLicenseState);
watcher->setFuture(future);
}
@ -175,11 +175,27 @@ index 39e9d11..d12c82a 100644
void SystemInfoWork::getEntryTitles()
{
@@ -399,6 +405,7 @@ void SystemInfoWork::getLicenseState()
qDebug() << "authorize result:" << reply;
m_model->setLicenseState(reply);
}
+#endif
unsigned int SystemInfoWork::getLicenseAuthorizationProperty()
{
@@ -414,7 +421,6 @@ unsigned int SystemInfoWork::getLicenseAuthorizationProperty()
return licenseInfo.property("AuthorizationProperty").value<unsigned int>();
}
-#endif
}
}
diff --git a/src/frame/modules/systeminfo/systeminfowork.h b/src/frame/modules/systeminfo/systeminfowork.h
index f95b719..9a996be 100644
index 284a6a5..b9887f5 100644
--- a/src/frame/modules/systeminfo/systeminfowork.h
+++ b/src/frame/modules/systeminfo/systeminfowork.h
@@ -62,14 +62,18 @@ public Q_SLOTS:
@@ -50,15 +50,19 @@ public Q_SLOTS:
void grubServerFinished();
void onBackgroundChanged();
void setBackground(const QString &path);
@ -188,6 +204,7 @@ index f95b719..9a996be 100644
void licenseStateChangeSlot();
+#endif
void processChanged(QDBusMessage msg);
void onLicenseAuthorizationProperty(void);
private:
void getEntryTitles();
@ -195,24 +212,24 @@ index f95b719..9a996be 100644
+#ifndef DISABLE_ACTIVATOR
void getLicenseState();
+#endif
unsigned int getLicenseAuthorizationProperty();
private:
SystemInfoModel* m_model;
diff --git a/src/frame/modules/update/updatemodel.cpp b/src/frame/modules/update/updatemodel.cpp
index 378f33d..4fcc591 100644
index a01e711..fe2c45b 100644
--- a/src/frame/modules/update/updatemodel.cpp
+++ b/src/frame/modules/update/updatemodel.cpp
@@ -69,7 +69,9 @@ UpdateModel::UpdateModel(QObject *parent)
@@ -64,7 +64,9 @@ UpdateModel::UpdateModel(QObject *parent)
, m_bRecoverRestoring(false)
, m_systemVersionInfo("")
, m_systemVersionInfo(QString())
, m_metaEnum(QMetaEnum::fromType<ModelUpdatesStatus>())
+#ifndef DISABLE_ACTIVATOR
, m_bSystemActivation(UiActiveState::Unknown)
+#endif
, m_lastCheckUpdateTime(QString())
, m_autoCheckUpdateCircle(0)
, m_isUpdatablePackages(false)
@@ -353,6 +355,7 @@ void UpdateModel::setSystemVersionInfo(const QString &systemVersionInfo)
, m_testingChannelServer(QString())
@@ -411,6 +413,7 @@ void UpdateModel::setSystemVersionInfo(const QString &systemVersionInfo)
Q_EMIT systemVersionChanged(systemVersionInfo);
}
@ -220,7 +237,7 @@ index 378f33d..4fcc591 100644
void UpdateModel::setSystemActivation(const UiActiveState &systemactivation)
{
if (m_bSystemActivation == systemactivation) {
@@ -362,6 +365,7 @@ void UpdateModel::setSystemActivation(const UiActiveState &systemactivation)
@@ -420,6 +423,7 @@ void UpdateModel::setSystemActivation(const UiActiveState &systemactivation)
Q_EMIT systemActivationChanged(systemactivation);
}
@ -229,10 +246,10 @@ index 378f33d..4fcc591 100644
void UpdateModel::isUpdatablePackages(bool isUpdatablePackages)
{
diff --git a/src/frame/modules/update/updatemodel.h b/src/frame/modules/update/updatemodel.h
index b268e09..76e7778 100644
index 6187b89..f4189fb 100644
--- a/src/frame/modules/update/updatemodel.h
+++ b/src/frame/modules/update/updatemodel.h
@@ -158,8 +158,10 @@ public:
@@ -164,8 +164,10 @@ public:
bool getIsRecoveryBackingup(UpdatesStatus state) const;
@ -243,7 +260,7 @@ index b268e09..76e7778 100644
inline bool getUpdatablePackages() const {return m_isUpdatablePackages;}
void isUpdatablePackages(bool isUpdatablePackages);
@@ -203,7 +205,9 @@ Q_SIGNALS:
@@ -282,7 +284,9 @@ Q_SIGNALS:
void recoverConfigValidChanged(bool recoverConfigValid);
void recoverRestoringChanged(bool recoverRestoring);
void systemVersionChanged(QString version);
@ -253,11 +270,10 @@ index b268e09..76e7778 100644
void beginCheckUpdate();
void updateCheckUpdateTime();
void updateHistoryAppInfos();
@@ -239,7 +243,10 @@ private:
@@ -334,7 +338,9 @@ private:
bool m_bRecoverRestoring;
QString m_systemVersionInfo;
QMetaEnum m_metaEnum;
+
+#ifndef DISABLE_ACTIVATOR
UiActiveState m_bSystemActivation;
+#endif
@ -265,10 +281,10 @@ index b268e09..76e7778 100644
QString m_lastCheckUpdateTime; //上次检查更新时间
QList<AppUpdateInfo> m_historyAppInfos; //历史更新应用列表
diff --git a/src/frame/modules/update/updatework.cpp b/src/frame/modules/update/updatework.cpp
index 1f07732..d7a9573 100644
index ffda8a3..8a64560 100644
--- a/src/frame/modules/update/updatework.cpp
+++ b/src/frame/modules/update/updatework.cpp
@@ -200,6 +200,7 @@ void UpdateWorker::init() {
@@ -221,6 +221,7 @@ void UpdateWorker::init()
#endif
}
@ -276,7 +292,7 @@ index 1f07732..d7a9573 100644
void UpdateWorker::licenseStateChangeSlot()
{
QFutureWatcher<void> *watcher = new QFutureWatcher<void>();
@@ -227,6 +228,7 @@ void UpdateWorker::getLicenseState()
@@ -248,6 +249,7 @@ void UpdateWorker::getLicenseState()
qDebug() << "Authorization State:" << reply;
m_model->setSystemActivation(reply);
}
@ -284,7 +300,7 @@ index 1f07732..d7a9573 100644
void UpdateWorker::activate()
{
@@ -260,11 +262,13 @@ void UpdateWorker::activate()
@@ -300,11 +302,13 @@ void UpdateWorker::activate()
refreshMirrors();
#endif
@ -296,13 +312,13 @@ index 1f07732..d7a9573 100644
this, SLOT(licenseStateChangeSlot()));
+#endif
QFutureWatcher<QStringList> *packagesWatcher = new QFutureWatcher<QStringList>();
connect(packagesWatcher, &QFutureWatcher<QStringList>::finished, this, [=] {
QFutureWatcher<QMap<QString, QStringList>> *packagesWatcher = new QFutureWatcher<QMap<QString, QStringList>>();
connect(packagesWatcher, &QFutureWatcher<QStringList>::finished, this, [ = ] {
diff --git a/src/frame/modules/update/updatework.h b/src/frame/modules/update/updatework.h
index 977091b..a100c28 100644
index 7610383..a34ef72 100644
--- a/src/frame/modules/update/updatework.h
+++ b/src/frame/modules/update/updatework.h
@@ -72,7 +72,9 @@ public:
@@ -85,7 +85,9 @@ public:
void setOnBattery(bool onBattery);
void setBatteryPercentage(const BatteryPercentageInfo &info);
void setSystemBatteryPercentage(const double &value);
@ -310,12 +326,12 @@ index 977091b..a100c28 100644
void getLicenseState();
+#endif
Q_SIGNALS:
void requestInit();
@@ -107,7 +109,9 @@ public Q_SLOTS:
void recoveryCanBackup();
void setSysUpdateDownloadJobName(const QString &sysUpdateDownloadJobName);
void setSafeUpdateDownloadJobName(const QString &safeUpdateDownloadJobName);
@@ -127,7 +129,9 @@ public Q_SLOTS:
void recoveryStartRestore();
void onNotifyDownloadInfoChanged();
void onRecoveryBackupFinshed(const QString &kind, const bool success, const QString &errMsg);
+#ifndef DISABLE_ACTIVATOR
void licenseStateChangeSlot();
+#endif
@ -323,10 +339,10 @@ index 977091b..a100c28 100644
void refreshLastTimeAndCheckCircle();
void setUpdateNotify(const bool notify);
diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
index e1c1fb7..82e5640 100644
index 3ba9b1f..02fc1ca 100644
--- a/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
+++ b/src/frame/window/modules/systeminfo/nativeinfowidget.cpp
@@ -54,7 +54,9 @@ NativeInfoWidget::NativeInfoWidget(SystemInfoModel *model, QWidget *parent)
@@ -84,7 +84,9 @@ NativeInfoWidget::NativeInfoWidget(SystemInfoModel *model, QWidget *parent)
NativeInfoWidget::~NativeInfoWidget()
{
@ -336,24 +352,24 @@ index e1c1fb7..82e5640 100644
GSettingWatcher::instance()->erase("systeminfoNativeinfoKernel", m_kernel);
GSettingWatcher::instance()->erase("systeminfoNativeinfoProcessor", m_processor);
GSettingWatcher::instance()->erase("systeminfoNativeinfoMemory", m_memory);
@@ -104,6 +106,7 @@ void NativeInfoWidget::initWidget()
//~ contents_path /systeminfo/About This PC
m_type->setTitle(tr("Type:"));
@@ -195,6 +197,7 @@ void NativeInfoWidget::initWidget()
//~ child_page About This PC
m_type->setTitle(tr("Type") + ':');
+#ifndef DISABLE_ACTIVATOR
m_authorized = new TitleAuthorizedItem(frame);
m_authorized->setTitle(tr("Authorization") + ':');
m_authorized->setValue(tr("To be activated"));
@@ -114,6 +117,7 @@ void NativeInfoWidget::initWidget()
} else {
//~ contents_path /systeminfo/About This PC
//~ child_page About This PC
@@ -208,6 +211,7 @@ void NativeInfoWidget::initWidget()
m_authorized->setVisable(true);
}
}*/
m_authorized->setVisable(true);
+#endif
m_kernel = new TitleValueItem(frame);
//~ contents_path /systeminfo/About This PC
@@ -130,7 +134,9 @@ void NativeInfoWidget::initWidget()
m_memory->setTitle(tr("Memory:"));
@@ -227,7 +231,9 @@ void NativeInfoWidget::initWidget()
m_memory->setTitle(tr("Memory") + ':');
m_memory->setValue(m_model->memory());
+#ifndef DISABLE_ACTIVATOR
@ -362,7 +378,7 @@ index e1c1fb7..82e5640 100644
GSettingWatcher::instance()->bind("systeminfoNativeinfoKernel", m_kernel);
GSettingWatcher::instance()->bind("systeminfoNativeinfoProcessor", m_processor);
GSettingWatcher::instance()->bind("systeminfoNativeinfoMemory", m_memory);
@@ -143,9 +149,11 @@ void NativeInfoWidget::initWidget()
@@ -240,9 +246,11 @@ void NativeInfoWidget::initWidget()
}
infoGroup->appendItem(m_version, SettingsGroup::ItemBackground);
infoGroup->appendItem(m_type);
@ -374,7 +390,7 @@ index e1c1fb7..82e5640 100644
infoGroup->appendItem(m_kernel);
infoGroup->appendItem(m_processor);
infoGroup->appendItem(m_memory);
@@ -175,13 +183,17 @@ void NativeInfoWidget::initWidget()
@@ -273,13 +281,17 @@ void NativeInfoWidget::initWidget()
connect(m_model, &SystemInfoModel::processorChanged, this, &NativeInfoWidget::setProcessor);
connect(m_model, &SystemInfoModel::memoryChanged, this, &NativeInfoWidget::setMemory);
@ -391,8 +407,8 @@ index e1c1fb7..82e5640 100644
+#endif
}
void NativeInfoWidget::setProductName(const QString &edition)
@@ -214,6 +226,7 @@ void NativeInfoWidget::setMemory(const QString &memory)
void NativeInfoWidget::resizeEvent(QResizeEvent *event)
@@ -335,6 +347,7 @@ void NativeInfoWidget::setMemory(const QString &memory)
m_memory->setValue(memory);
}
@ -400,8 +416,8 @@ index e1c1fb7..82e5640 100644
void NativeInfoWidget::setLicenseState(ActiveState state)
{
if (state == Authorized) {
@@ -238,6 +251,7 @@ void NativeInfoWidget::setLicenseState(ActiveState state)
m_authorized->setButtonText(tr("Activate"));
@@ -363,6 +376,7 @@ void NativeInfoWidget::setLicenseState(ActiveState state)
m_authorized->setButtonText(tr("View"));
}
}
+#endif
@ -409,10 +425,10 @@ index e1c1fb7..82e5640 100644
const QString NativeInfoWidget::systemCopyright() const
{
diff --git a/src/frame/window/modules/systeminfo/nativeinfowidget.h b/src/frame/window/modules/systeminfo/nativeinfowidget.h
index cca4b19..50e1555 100644
index 8dea9d7..699c2f4 100644
--- a/src/frame/window/modules/systeminfo/nativeinfowidget.h
+++ b/src/frame/window/modules/systeminfo/nativeinfowidget.h
@@ -58,10 +58,14 @@ public Q_SLOTS:
@@ -63,7 +63,9 @@ public Q_SLOTS:
void setType(const QString &type);
void setProcessor(const QString &processor);
void setMemory(const QString &memory);
@ -420,14 +436,19 @@ index cca4b19..50e1555 100644
void setLicenseState(dcc::systeminfo::ActiveState state);
+#endif
void onToolButtonButtonClicked();
void onFocusChanged(const bool onFocus);
@@ -74,7 +76,9 @@ public Q_SLOTS:
void onSetHostNameError(const QString &error);
Q_SIGNALS:
+#ifndef DISABLE_ACTIVATOR
void clickedActivator();
+#endif
private:
dcc::systeminfo::SystemInfoModel *m_model;
@@ -70,7 +74,9 @@ private:
protected:
void resizeEvent(QResizeEvent *event) override;
@@ -92,7 +96,9 @@ private:
dcc::widgets::TitleValueItem *m_versionNumber;
dcc::widgets::TitleValueItem *m_version;
dcc::widgets::TitleValueItem *m_type;
@ -438,10 +459,10 @@ index cca4b19..50e1555 100644
dcc::widgets::TitleValueItem *m_processor;
dcc::widgets::TitleValueItem *m_memory;
diff --git a/src/frame/window/modules/systeminfo/systeminfomodule.cpp b/src/frame/window/modules/systeminfo/systeminfomodule.cpp
index 05fac20..563a3ee 100644
index ba7444a..3d4a4d4 100644
--- a/src/frame/window/modules/systeminfo/systeminfomodule.cpp
+++ b/src/frame/window/modules/systeminfo/systeminfomodule.cpp
@@ -129,7 +129,9 @@ void SystemInfoModule::onShowAboutNativePage()
@@ -254,7 +254,9 @@ void SystemInfoModule::onShowAboutNativePage()
m_frameProxy->pushWidget(this, w);
w->setVisible(true);
//showActivatorDialog
@ -452,20 +473,24 @@ index 05fac20..563a3ee 100644
void SystemInfoModule::onVersionProtocolPage()
diff --git a/src/frame/window/modules/update/updatectrlwidget.cpp b/src/frame/window/modules/update/updatectrlwidget.cpp
index 7f294e5..ed39906 100644
index 6285d73..db26368 100644
--- a/src/frame/window/modules/update/updatectrlwidget.cpp
+++ b/src/frame/window/modules/update/updatectrlwidget.cpp
@@ -65,7 +65,9 @@ UpdateCtrlWidget::UpdateCtrlWidget(UpdateModel *model, QWidget *parent)
@@ -51,9 +51,13 @@ UpdateCtrlWidget::UpdateCtrlWidget(UpdateModel *model, QWidget *parent)
, m_bRecoverBackingUp(false)
, m_bRecoverConfigValid(false)
, m_bRecoverRestoring(false)
, m_activeState(UiActiveState::Unknown)
, m_updateList(new ContentWidget)
+#ifndef DISABLE_ACTIVATOR
, m_authorizationPrompt(new TipsLabel)
, m_activeState(UiActiveState::Unknown)
+#endif
, m_checkUpdateBtn(new QPushButton)
, m_lastCheckTimeTip(new TipsLabel)
{
@@ -81,11 +83,15 @@ UpdateCtrlWidget::UpdateCtrlWidget(UpdateModel *model, QWidget *parent)
, m_updateList(new ContentWidget(parent))
+#ifndef DISABLE_ACTIVATOR
, m_authorizationPrompt(new TipsLabel(parent))
+#endif
, m_isUpdateingAll(false)
, m_checkUpdateBtn(new QPushButton(parent))
, m_lastCheckTimeTip(new TipsLabel(parent))
@@ -94,11 +98,15 @@ UpdateCtrlWidget::UpdateCtrlWidget(UpdateModel *model, QWidget *parent)
m_fullProcess->setVisible(false);
m_fullProcess->setProcessValue(100);
@ -479,9 +504,9 @@ index 7f294e5..ed39906 100644
fullProcesslayout->addWidget(m_authorizationPrompt);
+#endif
m_summaryGroup->setVisible(true);
@@ -167,7 +173,9 @@ void UpdateCtrlWidget::setShowInfo(const UiActiveState value)
m_powerTip->setWordWrap(true);
m_powerTip->setAlignment(Qt::AlignHCenter);
@@ -290,7 +298,9 @@ void UpdateCtrlWidget::setShowInfo(const UiActiveState value)
}
m_fullProcess->setEnabled(activation);
@ -490,11 +515,11 @@ index 7f294e5..ed39906 100644
+#endif
}
void UpdateCtrlWidget::loadAppList(const QList<AppUpdateInfo> &infos)
@@ -248,9 +256,11 @@ void UpdateCtrlWidget::setStatus(const UpdatesStatus &status)
{
void UpdateCtrlWidget::setStatus(const UpdatesStatus &status)
@@ -298,9 +308,11 @@ void UpdateCtrlWidget::setStatus(const UpdatesStatus &status)
m_status = status;
qDebug() << "UpdateCtrlWidget::setStatus " << status;
+#ifndef DISABLE_ACTIVATOR
if (m_model->systemActivation() == UiActiveState::Unauthorized || m_model->systemActivation() == UiActiveState::TrialExpired) {
m_status = NoAtive;
@ -503,7 +528,7 @@ index 7f294e5..ed39906 100644
Q_EMIT notifyUpdateState(m_status);
@@ -259,7 +269,9 @@ void UpdateCtrlWidget::setStatus(const UpdatesStatus &status)
@@ -309,7 +321,9 @@ void UpdateCtrlWidget::setStatus(const UpdatesStatus &status)
m_resultItem->setVisible(false);
m_progress->setVisible(false);
m_fullProcess->setVisible(false);
@ -513,45 +538,79 @@ index 7f294e5..ed39906 100644
m_updateList->setVisible(false);
m_upgradeWarningGroup->setVisible(false);
m_reminderTip->setVisible(false);
@@ -307,7 +319,9 @@ void UpdateCtrlWidget::setStatus(const UpdatesStatus &status)
m_fullProcess->setMessage(tr("Download and install updates"));
setDownloadInfo(m_model->downloadInfo());
setLowBattery(m_model->lowBattery());
@@ -430,10 +444,12 @@ void UpdateCtrlWidget::setLowBattery(const bool &lowBattery)
{
if (m_status == UpdatesStatus::Updateing || m_status == UpdatesStatus::UpdatesAvailable) {
bool activation = false;
+#ifndef DISABLE_ACTIVATOR
setShowInfo(m_model->systemActivation());
const UiActiveState value = m_model->systemActivation();
if (UiActiveState::Authorized == value || UiActiveState::TrialAuthorized == value || UiActiveState::AuthorizedLapse == value) {
activation = true;
}
+#endif
break;
case UpdatesStatus::Downloading:
m_progress->setVisible(true);
@@ -512,7 +526,9 @@ void UpdateCtrlWidget::setModel(UpdateModel *model)
if (lowBattery) {
m_powerTip->setText(tr("Your battery is lower than 50%, please plug in to continue"));
} else {
@@ -481,6 +497,7 @@ void UpdateCtrlWidget::setRecoverRestoring(const bool value)
}
}
+#ifndef DISABLE_ACTIVATOR
void UpdateCtrlWidget::setActiveState(const UiActiveState &activestate)
{
if (m_activeState != activestate) {
@@ -493,7 +510,7 @@ void UpdateCtrlWidget::setActiveState(const UiActiveState &activestate)
setStatus(m_model->status());
}
}
-
+#endif
void UpdateCtrlWidget::setModel(UpdateModel *model)
{
@@ -514,7 +531,9 @@ void UpdateCtrlWidget::setModel(UpdateModel *model)
connect(m_model, &UpdateModel::recoverBackingUpChanged, this, &UpdateCtrlWidget::setRecoverBackingUp);
connect(m_model, &UpdateModel::recoverConfigValidChanged, this, &UpdateCtrlWidget::setRecoverConfigValid);
connect(m_model, &UpdateModel::recoverRestoringChanged, this, &UpdateCtrlWidget::setRecoverRestoring);
+#ifndef DISABLE_ACTIVATOR
connect(m_model, &UpdateModel::systemActivationChanged, this, &UpdateCtrlWidget::setActiveState);
+#endif
connect(m_model, &UpdateModel::classityUpdateJobErrorChanged, this, &UpdateCtrlWidget::onClassityUpdateJonErrorChanged);
setUpdateProgress(m_model->updateProgress());
connect(m_model, &UpdateModel::systemUpdateInfoChanged, this, &UpdateCtrlWidget::setSystemUpdateInfo);
diff --git a/src/frame/window/modules/update/updatectrlwidget.h b/src/frame/window/modules/update/updatectrlwidget.h
index f54ee46..c9bb1ac 100644
index 99713c2..a4a9cb1 100644
--- a/src/frame/window/modules/update/updatectrlwidget.h
+++ b/src/frame/window/modules/update/updatectrlwidget.h
@@ -109,7 +109,9 @@ private:
@@ -103,7 +103,9 @@ private:
void setRecoverConfigValid(const bool value);
void setRecoverRestoring(const bool value);
void setShowInfo(const UiActiveState value);
+#ifndef DISABLE_ACTIVATOR
void setActiveState(const UiActiveState &activestate);
+#endif
void showUpdateInfo();
void onChangeUpdatesAvailableStatus();
@@ -135,9 +137,13 @@ private:
bool m_bRecoverBackingUp;
bool m_bRecoverConfigValid;
bool m_bRecoverRestoring;
+#ifndef DISABLE_ACTIVATOR
UiActiveState m_activeState;
+#endif
dcc::ContentWidget *m_updateList;
+#ifndef DISABLE_ACTIVATOR
dcc::widgets::TipsLabel *m_authorizationPrompt;
+#endif
bool m_isUpdateingAll;
QPushButton *m_checkUpdateBtn;
dcc::widgets::TipsLabel *m_lastCheckTimeTip;
diff --git a/src/frame/window/modules/update/updatemodule.cpp b/src/frame/window/modules/update/updatemodule.cpp
index e8b5a86..b545a7b 100644
index 2de16ba..9bf5b9a 100644
--- a/src/frame/window/modules/update/updatemodule.cpp
+++ b/src/frame/window/modules/update/updatemodule.cpp
@@ -79,7 +79,9 @@ void UpdateModule::preInitialize(bool sync, FrameProxyInterface::PushType pushty
@@ -61,7 +61,9 @@ void UpdateModule::preInitialize(bool sync, FrameProxyInterface::PushType pushty
connect(m_work.get(), &UpdateWorker::requestInit, m_work.get(), &UpdateWorker::init);
connect(m_work.get(), &UpdateWorker::requestActive, m_work.get(), &UpdateWorker::activate);
@ -561,19 +620,7 @@ index e8b5a86..b545a7b 100644
#ifndef DISABLE_SYS_UPDATE_MIRRORS
connect(m_work.get(), &UpdateWorker::requestRefreshMirrors, m_work.get(), &UpdateWorker::refreshMirrors);
@@ -157,9 +159,11 @@ void UpdateModule::active()
Q_EMIT m_work->requestRefreshLicenseState();
+#ifndef DISABLE_ACTIVATOR
if (m_model->systemActivation() == UiActiveState::Authorized || m_model->systemActivation() == UiActiveState::TrialAuthorized || m_model->systemActivation() == UiActiveState::AuthorizedLapse) {
m_updateWidget->setSystemVersion(m_model->systemVersionInfo());
}
+#endif
m_updateWidget->setModel(m_model, m_work.get());
connect(m_updateWidget, &UpdateWidget::pushMirrorsView, this, [=]() {
@@ -193,7 +197,7 @@ void UpdateModule::active()
@@ -176,7 +178,7 @@ void UpdateModule::active()
m_updateWidget->setSystemVersion(m_model->systemVersionInfo());
}
#else

Binary file not shown.

Binary file not shown.

View File

@ -1,24 +1,47 @@
%define specrelease 1%{?dist}
%if 0%{?openeuler}
%define specrelease 5
%endif
Name: dde-control-center
Version: 5.4.43.27
Release: %{specrelease}
Version: 5.5.182
Release: 7
Summary: New control center for Linux Deepin
License: GPLv3
URL: https://github.com/linuxdeepin/%{name}
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: 0001-hide-authorized.patch
Patch1: 0002-Repair-user-name-related-prompt-information.patch
URL: https://github.com/linuxdeepin/dde-coptrol-center
Source0: %{name}-%{version}.tar.gz
#add by uos
Patch0001: 0001-dde-control-center-uos-fix-modify-eulerServerEnduserAgreement_new-path.patch
# activate butten
Patch0003: 0003-dde-control-center-uos-open-activate-button-for-1050.patch
# disable windowmoveswitch
Patch0004: 0004-dde-control-center-disable-windowmoveswitch.patch
# add setVersion
Patch0005: 0005-dde-control-center-feat-add-setVersion.patch
# uelc hide commoninfo
Patch0006: 0006-hide-commonifo-and-end-user-license-agreement.patch
# add Free-license
Patch0007: 0007-dde-control-center-uos-add-Free-license.patch
# hidden power-press-powerbtn
Patch0008: 0008-dde-control-center-feat-hidden-power-press-powerbtn.patch
# modify copyright read current year
Patch0009: 0009-dde-control-center-feat-modify-copyright-read-current-year.patch
Patch0010: 0001-feat-root.patch
# pms 204145
Patch0011: 0010-fix-Array-out-of-bounds-causes-crash-handling.patch
# hide activate
Patch0012: 0011-hide-activate-function.patch
#end
#Patch0: 0002-hide-authorized.patch
#Patch1: 0001-dde-control-center-uos-fix-modify-eulerServerEnduserAgreement_new-path.patch
#Patch2: 0003-bugfix-for-no-check-newpassword-at-modifypwd.patch
#Patch3: 0004-fix.patch
#Patch4: 0005-fix-hide-commoninfo-and-end-user-license-agreement.patch
BuildRequires: gcc-c++
BuildRequires: desktop-file-utils
BuildRequires: dde-dock-devel
BuildRequires: pkgconfig(dde-network-utils)
BuildRequires: dde-network-core-devel
BuildRequires: dtkwidget-devel
BuildRequires: dtkgui-devel dtkcore-devel
BuildRequires: dtkgui-devel
BuildRequires: dtkcore-devel
BuildRequires: dde-qt-dbus-factory-devel
BuildRequires: pkgconfig(gsettings-qt)
BuildRequires: pkgconfig(geoip)
@ -37,14 +60,25 @@ BuildRequires: gmock-devel
BuildRequires: polkit-qt5-1-devel
BuildRequires: deepin-pw-check
BuildRequires: deepin-pw-check-devel
BuildRequires: pkgconfig(wayland-client)
BuildRequires: kf5-kwayland-devel
BuildRequires: qt5-qtbase-static
BuildRequires: libxkbcommon-devel
BuildRequires: pkgconfig(wayland-client)
BuildRequires: kf5-kwayland-devel
BuildRequires: qt5-qtbase-static
BuildRequires: libxkbcommon-devel
BuildRequires: dareader-devel
BuildRequires: qt5-qtbase-private-devel
Requires: dde-account-faces
Requires: dde-api
Requires: dde-daemon
Requires: dde-qt5integration
Requires: dde-network-utils
Requires: dde-network-core
Requires: startdde
Requires: dde-server-industry-config
#Requires: deepin-pw-check
Requires: deepin-pw-check
Requires: cracklib
Recommends: NetworkManager-l2tp
@ -59,15 +93,30 @@ Summary: %{summary}
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch0001 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%patch0009 -p1
%patch0010 -p1
%patch0011 -p1
%patch0012 -p1
sed -i 's|lrelease|lrelease-qt5|' translate_generation.sh
sed -i -E '/add_compile_definitions/d' CMakeLists.txt
%build
%cmake . -DDCC_DISABLE_GRUB=YES \
-DDISABLE_AUTHENTICATION=YES \
-DDISABLE_ACCOUNT=YES \
-DDISABLE_SYS_UPDATE=YES \
-DDISABLE_ACTIVATOR=YES
-DDISABLE_SYS_UPDATE_SOURCE_CHECK=YES \
-DDISABLE_SYS_UPDATE_MIRRORS=YES \
-DDISABLE_ACTIVATOR=YES \
-DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir}
%make_build
%post
@ -85,8 +134,8 @@ mkdir -p %{buildroot}%{_libdir}/%{name}/plugins
# https://github.com/linuxdeepin/dde-control-center/issues/115
# And we disabled SYS_UPDATE, so reboot-reminder-dialog is useless.
#rm %{buildroot}%{_bindir}/reboot-reminder-dialog
mkdir -p %{buildroot}/usr/lib64/cmake/DdeControlCenter
mv %{buildroot}/cmake/DdeControlCenter/DdeControlCenterConfig.cmake %{buildroot}/usr/lib64/cmake/DdeControlCenter
#mkdir -p %{buildroot}/usr/lib64/cmake/DdeControlCenter
#mv %{buildroot}/cmake/DdeControlCenter/DdeControlCenterConfig.cmake %{buildroot}/usr/lib64/cmake/DdeControlCenter
mv %{buildroot}/usr/lib/libdccwidgets.so %{buildroot}%{_libdir}/
install -Dm644 com.deepin.controlcenter.addomain.policy %{buildroot}%{_datadir}/polkit-1/actions/
@ -98,19 +147,49 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop ||:
%files
%doc README.md
%license LICENSE
%{_sysconfdir}/
%{_bindir}/abrecovery
%{_bindir}/dde-control-center
%{_bindir}/dde-control-center-wapper
%{_datadir}/
%{_libdir}/libdccwidgets.so
/etc/xdg/autostart/deepin-ab-recovery.desktop
%{_sysconfdir}/xdg/autostart/deepin-ab-recovery.desktop
%{_prefix}/lib/dde-grand-search-daemon/
%files devel
%{_includedir}/dde-control-center
%{_libdir}/cmake/DdeControlCenter/
%changelog
* Wed Dec 06 2023 liuzhilin <liuzhilin@uniontech.com> - 5.5.182-7
- update BR
* Tue Dec 05 2023 liuzhilin <liuzhilin@uniontech.com> - 5.5.182-6
- fix build BR
* Wed Sep 06 2023 leeffo <liweiganga@uniontech.com> - 5.5.182-5
- disable activate button
* Tue Aug 29 2023 yangxianzhao <yangxianzhao@uniontech.com> - 5.5.182-4
- Update BR
* Tue Aug 29 2023 yangxianzhao <yangxianzhao@uniontech.com> - 5.5.182-3
- Modify BR for build on qt5-qtbase-5.15.10
* Fri Aug 18 2023 leeffo <liweiganga@uniontech.com> - 5.5.182-2
- update BR
* Wed Aug 02 2023 leeffo <liweiganga@uniontech.com> - 5.5.182-1
- upgrade to version 5.5.182
* Thu Jun 08 2023 lee <liweiganga@uniontech.com> - 5.4.85.4-3
- fix: control-center core and hide commoninfo
* Tue Apr 11 2023 Dongxing Wang <dxwangk@isoftstone.com> - 5.4.85.4-2
- fix: issue#I6QIOR bugfix-for-no-check-newpassword-at-modifypwd
* Mon Apr 10 2023 liweiganga <liweiganga@uniontech.com> - 5.4.85.4-1
- update: update to 5.4.85.4
* Thu Apr 06 2023 yangxianzhao <yangxianzhao@uniontech.com> - 5.4.43.27-5
- Repair user name related prompt information