fix(account): The connection singleton in the signal slot is not automatically disconnected because the receiver parameter is not added, resulting in a crash。

fix(battery idle): remove invalid idle shutdown display option
This commit is contained in:
liuxinhao 2022-08-18 21:05:49 +08:00
parent 2a63ba01fc
commit c41fbf7514
3 changed files with 95 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From bbc782ebca691f8a93d2f17c3fb8b2f0bf87ae9d Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
Date: Thu, 18 Aug 2022 20:31:25 +0800
Subject: [PATCH 1/2] fix(battery idle): remove invalid idle shutdown display
option
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 移除掉无效的空闲关闭显示器选项
Closes #I5M336
---
.../power/src/pages/battery-settings/battery-settings-page.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/plugins/power/src/pages/battery-settings/battery-settings-page.cpp b/plugins/power/src/pages/battery-settings/battery-settings-page.cpp
index 3dd50af..222d9bb 100644
--- a/plugins/power/src/pages/battery-settings/battery-settings-page.cpp
+++ b/plugins/power/src/pages/battery-settings/battery-settings-page.cpp
@@ -65,7 +65,6 @@ void BatterySettingsPage::initUI()
///计算机空闲进行的操作
// clang-format off
QMap<QString, int> computerIdleActionsMap = {
- {tr("Display Off"), POWER_ACTION_DISPLAY_OFF},
{tr("Suspend"), POWER_ACTION_COMPUTER_SUSPEND},
{tr("Shutdown"), POWER_ACTION_COMPUTER_SHUTDOWN},
{tr("Hibernate"), POWER_ACTION_COMPUTER_HIBERNATE},
--
2.36.1

View File

@ -0,0 +1,58 @@
From f8ddcc8b9d0a53e9105bc42feb6f5d02561e207e Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
Date: Thu, 18 Aug 2022 20:39:14 +0800
Subject: [PATCH 2/2] fix(account): The connection singleton in the signal slot
is not automatically disconnected because the receiver parameter is not
added, resulting in a crash
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复账户管理中信号槽中连接单例未加入接受者参数导致未自动断开,崩溃问题
Closes #I5HRYF
---
plugins/account/src/kiran-account-manager.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/plugins/account/src/kiran-account-manager.cpp b/plugins/account/src/kiran-account-manager.cpp
index 8602456..c21b8b9 100644
--- a/plugins/account/src/kiran-account-manager.cpp
+++ b/plugins/account/src/kiran-account-manager.cpp
@@ -359,7 +359,7 @@ void KiranAccountManager::initPageSelectAvatar()
void KiranAccountManager::initPageAuthManager()
{
//TODO:init auth manager page
- connect(m_page_authManager, &AuthManagerPage::sigReturn, [this]() {
+ connect(m_page_authManager, &AuthManagerPage::sigReturn, this,[this]() {
m_stackWidget->setCurrentIndex(PAGE_USER_INFO);
});
}
@@ -367,13 +367,13 @@ void KiranAccountManager::initPageAuthManager()
void KiranAccountManager::connectToInfoChanged()
{
//处理用户新增、删除
- connect(AccountsGlobalInfo::instance(), &AccountsGlobalInfo::UserAdded,
+ connect(AccountsGlobalInfo::instance(), &AccountsGlobalInfo::UserAdded,this,
[this](const QDBusObjectPath &obj) {
KLOG_INFO() << "siderbar add item:" << obj.path();
appendSiderbarItem(obj.path());
});
- connect(AccountsGlobalInfo::instance(), &AccountsGlobalInfo::UserDeleted,
+ connect(AccountsGlobalInfo::instance(), &AccountsGlobalInfo::UserDeleted,this,
[this](const QDBusObjectPath &obj) {
KLOG_INFO() << "siderbar delete item:" << obj.path();
int findIdx = -1;
@@ -402,7 +402,7 @@ void KiranAccountManager::connectToInfoChanged()
});
//处理用户属性变更
- connect(AccountsGlobalInfo::instance(), &AccountsGlobalInfo::UserPropertyChanged,
+ connect(AccountsGlobalInfo::instance(), &AccountsGlobalInfo::UserPropertyChanged,this,
[this](QString userPath, QString propertyName, QVariant value) {
//侧边栏
if ((propertyName == "locked") || (propertyName == "icon_file"))
--
2.36.1

View File

@ -1,6 +1,6 @@
Name: kiran-control-panel
Version: 2.3.4
Release: 5
Release: 6
Summary: Kiran Control Panel
Summary(zh_CN): Kiran桌面控制面板
@ -13,6 +13,8 @@ Patch0003: 0001-fix-netwowrk-fix-not-searching-the-wireless-network-.patch
Patch0004: 0001-refactor-panel-set-panel-creategory-widget-auto-fill.patch
Patch0005: 0001-fix-search-when-the-relevant-setting-interface-canno.patch
Patch0006: 0002-fix-account-error-prompt-box-is-added-with-the-defau.patch
Patch0007: 0001-fix-battery-idle-remove-invalid-idle-shutdown-displa.patch
Patch0008: 0002-fix-account-The-connection-singleton-in-the-signal-s.patch
BuildRequires: gcc-c++
BuildRequires: cmake >= 3.2
@ -171,6 +173,10 @@ make %{?_smp_mflags}
rm -rf %{buildroot}
%changelog
* Thu Aug 18 2022 liuxinhao <liuxinhao@kylinsec.com.cn> - 2.3.4-6
- KYOS-F: account the connection singleton in the signal slot is not automatically disconnected because the receiver parameter is not added, resulting in a crash(#I5HRYF)
- KYOS-F: power ,remove invalid idle shutdown display option(#I5M336)
* Wed Aug 10 2022 liuxinhao <liuxinhao@kylinsec.com.cn> - 2.3.4-5
- KYOS-B: error prompt box is added with the default disappearance time(#I5HR61)
- KYOS-B: when the relevant setting interface cannot be searched, a prompt will be added(#I5H192)