From 2f57263c413021716397841ca9d0bfc9628c8703 Mon Sep 17 00:00:00 2001 From: SineStriker <trueful@163.com> Date: 周三, 06 12月 2023 18:28:52 +0800 Subject: [PATCH] Revert "update pointer usage" --- src/core/contexts/abstractwindowcontext.cpp | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/core/contexts/abstractwindowcontext.cpp b/src/core/contexts/abstractwindowcontext.cpp index 654f918..1c0e739 100644 --- a/src/core/contexts/abstractwindowcontext.cpp +++ b/src/core/contexts/abstractwindowcontext.cpp @@ -2,15 +2,11 @@ namespace QWK { - AbstractWindowContext::AbstractWindowContext(const QObject *host, const WindowItemDelegate *delegate) + AbstractWindowContext::AbstractWindowContext(QObject *host, WindowItemDelegate *delegate) : m_host(host), m_delegate(delegate), m_windowHandle(delegate->hostWindow(host)) { } - AbstractWindowContext::~AbstractWindowContext() { - if (m_delegate) { - delete m_delegate; - } - } + AbstractWindowContext::~AbstractWindowContext() = default; bool AbstractWindowContext::setHitTestVisible(const QObject *obj, bool visible) { Q_ASSERT(obj); -- Gitblit v1.9.1