From ed4f2fb961c274d99c8ca66c232ca13b6e855f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= Date: Thu, 25 Apr 2024 09:41:37 +0800 Subject: [PATCH] fix wrong assignment operator implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 侯红勋 --- src/notifyreceiveinfo.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/notifyreceiveinfo.cpp b/src/notifyreceiveinfo.cpp index 0c28cd1..8c1e04e 100644 --- a/src/notifyreceiveinfo.cpp +++ b/src/notifyreceiveinfo.cpp @@ -49,8 +49,20 @@ notifyReceiveInfo::notifyReceiveInfo(const notifyReceiveInfo ¬ify) : notifyReceiveInfo ¬ifyReceiveInfo::operator=(const notifyReceiveInfo ¬ify) { - notifyReceiveInfo ent(notify); - return ent; + m_appName = notify.m_appName; + m_id = notify.m_id; + m_appIcon = notify.m_appIcon; + m_summary = notify.m_summary; + m_body = notify.m_body; + m_actions = notify.m_actions; + m_hints = notify.m_hints; + m_ctime = notify.m_ctime; + m_replacesId = notify.m_replacesId; + m_timeout = notify.m_timeout; + m_urlStr = notify.m_urlStr; + m_actionStr = notify.m_actionStr; + + return *this; } QString notifyReceiveInfo::appName() const -- 2.43.0