From 129c32448fa36482c46ae9645e18a62722a04e53 Mon Sep 17 00:00:00 2001 From: SineStriker <trueful@163.com> Date: 周三, 06 12月 2023 18:27:56 +0800 Subject: [PATCH] Revert "fix mem leak" --- src/core/contexts/abstractwindowcontext_p.h | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/contexts/abstractwindowcontext_p.h b/src/core/contexts/abstractwindowcontext_p.h index b1202ea..127b33d 100644 --- a/src/core/contexts/abstractwindowcontext_p.h +++ b/src/core/contexts/abstractwindowcontext_p.h @@ -16,13 +16,13 @@ class QWK_CORE_EXPORT AbstractWindowContext : public QObject { Q_OBJECT public: - AbstractWindowContext(QObject *host, WindowItemDelegate *delegate); + AbstractWindowContext(const QObject *host, const WindowItemDelegate *delegate); ~AbstractWindowContext() override; public: virtual bool setup() = 0; - inline QObject *host() const; + inline const QObject *host() const; inline QWindow *window() const; inline bool isHitTestVisible(const QObject *obj) const; @@ -42,8 +42,8 @@ bool isInTitleBarDraggableArea(const QPoint &pos) const; protected: - QObject *m_host; - std::unique_ptr<WindowItemDelegate> m_delegate; + const QObject *m_host; + const WindowItemDelegate *m_delegate; QWindow *m_windowHandle; QSet<const QObject *> m_hitTestVisibleItems; @@ -57,7 +57,7 @@ mutable QRegion hitTestVisibleShape; }; - inline QObject *AbstractWindowContext::host() const { + inline const QObject *AbstractWindowContext::host() const { return m_host; } -- Gitblit v1.9.1