From bbd0f1932fcf7a730d8ab9410e158f2b1035bc23 Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周三, 13 12月 2023 18:53:02 +0800 Subject: [PATCH] Add cocoa --- src/core/windowagentbase.cpp | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/core/windowagentbase.cpp b/src/core/windowagentbase.cpp index b179042..a796b3e 100644 --- a/src/core/windowagentbase.cpp +++ b/src/core/windowagentbase.cpp @@ -5,6 +5,8 @@ #if defined(Q_OS_WINDOWS) && !defined(QWINDOWKIT_FORCE_QT_WINDOW_CONTEXT) # include "win32windowcontext_p.h" +#elif defined(Q_OS_MAC) && !defined(QWINDOWKIT_FORCE_QT_WINDOW_CONTEXT) +# include "cocoawindowcontext_p.h" #else # include "qtwindowcontext_p.h" #endif @@ -28,8 +30,11 @@ if (windowContextFactoryMethod) { return windowContextFactoryMethod(); } + #if defined(Q_OS_WINDOWS) && !defined(QWINDOWKIT_FORCE_QT_WINDOW_CONTEXT) return new Win32WindowContext(); +#elif defined(Q_OS_MAC) && !defined(QWINDOWKIT_FORCE_QT_WINDOW_CONTEXT) + return new CocoaWindowContext(); #else return new QtWindowContext(); #endif -- Gitblit v1.9.1