From 1a1f26d9e4ab6a4fe51baa78e40c4cdf3f402bcf Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: ćšć, 07 12æ 2023 14:27:00 +0800 Subject: [PATCH] Add context factory --- src/core/corewindowagent_p.h | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/corewindowagent_p.h b/src/core/corewindowagent_p.h index 4c31d01..7ff6825 100644 --- a/src/core/corewindowagent_p.h +++ b/src/core/corewindowagent_p.h @@ -7,9 +7,7 @@ namespace QWK { class QWK_CORE_EXPORT CoreWindowAgentPrivate { - Q_DISABLE_COPY(CoreWindowAgentPrivate) Q_DECLARE_PUBLIC(CoreWindowAgent) - public: CoreWindowAgentPrivate(); virtual ~CoreWindowAgentPrivate(); @@ -18,9 +16,13 @@ CoreWindowAgent *q_ptr; // no need to initialize - bool setup(QWindow *window, const WindowItemDelegatePtr &delegate); + virtual AbstractWindowContext *createContext() const; - WindowContextPtr eventHandler; + bool setup(QObject *host, WindowItemDelegate *delegate); + + std::unique_ptr<AbstractWindowContext> context; + + Q_DISABLE_COPY_MOVE(CoreWindowAgentPrivate) }; } -- Gitblit v1.9.1