From 2f6c83c095724bbba0f43b2f2893ba73c17949a6 Mon Sep 17 00:00:00 2001 From: Zhao Yuhang <2546789017@qq.com> Date: 周一, 11 12月 2023 21:57:40 +0800 Subject: [PATCH] add quick border --- src/core/windowagentbase.cpp | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/core/windowagentbase.cpp b/src/core/windowagentbase.cpp index 94d1fca..65b7dad 100644 --- a/src/core/windowagentbase.cpp +++ b/src/core/windowagentbase.cpp @@ -13,6 +13,9 @@ namespace QWK { + WindowAgentBasePrivate::WindowContextFactoryMethod + WindowAgentBasePrivate::windowContextFactoryMethod = nullptr; + WindowAgentBasePrivate::WindowAgentBasePrivate() : q_ptr(nullptr), context(nullptr) { } @@ -22,15 +25,15 @@ } AbstractWindowContext *WindowAgentBasePrivate::createContext() const { - return + if (windowContextFactoryMethod) { + return windowContextFactoryMethod(); + } #ifdef Q_OS_WINDOWS - new Win32WindowContext() + return new Win32WindowContext(); #else - new QtWindowContext() + return new QtWindowContext(); #endif - ; } - bool WindowAgentBasePrivate::setup(QObject *host, WindowItemDelegate *delegate) { std::unique_ptr<AbstractWindowContext> ctx(createContext()); -- Gitblit v1.9.1