代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/kiran-cc-daemon 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From b4411b9fd05760433c8b15b3a9baa1dbe788a1f0 Mon Sep 17 00:00:00 2001
From: tangjie02 <tangjie02@kylinsec.com.cn>
Date: Thu, 10 Aug 2023 15:55:34 +0800
Subject: [PATCH] fix(xsettings): Fix the problem that variable serial isn't
increased when xsettings registry property is updated.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复当xsettings registry属性变化时serial变量未递增问题
Related #11637
Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
---
plugins/xsettings/xsettings-registry.cpp | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/plugins/xsettings/xsettings-registry.cpp b/plugins/xsettings/xsettings-registry.cpp
index 13472de..4d76599 100644
--- a/plugins/xsettings/xsettings-registry.cpp
+++ b/plugins/xsettings/xsettings-registry.cpp
@@ -209,19 +209,19 @@ bool XSettingsRegistry::init()
bool XSettingsRegistry::update(const std::string &name, int32_t value)
{
- auto var = std::make_shared<XSettingsPropertyInt>(name, value);
+ auto var = std::make_shared<XSettingsPropertyInt>(name, value, this->serial_);
return this->update(var);
}
bool XSettingsRegistry::update(const std::string &name, const Glib::ustring &value)
{
- auto var = std::make_shared<XSettingsPropertyString>(name, value.raw());
+ auto var = std::make_shared<XSettingsPropertyString>(name, value.raw(), this->serial_);
return this->update(var);
}
bool XSettingsRegistry::update(const std::string &name, const XSettingsColor &value)
{
- auto var = std::make_shared<XSettingsPropertyColor>(name, value);
+ auto var = std::make_shared<XSettingsPropertyColor>(name, value, this->serial_);
return this->update(var);
}
@@ -282,6 +282,7 @@ bool XSettingsRegistry::notify()
data.append(std::string("\0\0\0", 3));
data.append(std::string((char *)&this->serial_, 4));
data.append(std::string((char *)&nsettings, 4));
+ ++this->serial_;
// 填充body
for (const auto &iter : this->properties_)
@@ -310,4 +311,4 @@ char XSettingsRegistry::byte_order()
return (*(char *)&myint == 1) ? MSBFirst : LSBFirst;
}
-} // namespace Kiran
\ No newline at end of file
+} // namespace Kiran
--
2.36.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。