From 2452f5958272d50981ab89ff843d2fa715d33957 Mon Sep 17 00:00:00 2001
From: Zhao Yuhang <2546789017@qq.com>
Date: 摹曛, 14 12月 2023 21:23:25 +0800
Subject: [PATCH] add macos titlebar

---
 src/widgets/widgetwindowagent.cpp |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/widgets/widgetwindowagent.cpp b/src/widgets/widgetwindowagent.cpp
index ff76aef..8fa28a7 100644
--- a/src/widgets/widgetwindowagent.cpp
+++ b/src/widgets/widgetwindowagent.cpp
@@ -9,11 +9,9 @@
 
 namespace QWK {
 
-    WidgetWindowAgentPrivate::WidgetWindowAgentPrivate() {
-    }
+    WidgetWindowAgentPrivate::WidgetWindowAgentPrivate() = default;
 
-    WidgetWindowAgentPrivate::~WidgetWindowAgentPrivate() {
-    }
+    WidgetWindowAgentPrivate::~WidgetWindowAgentPrivate() = default;
 
     void WidgetWindowAgentPrivate::init() {
     }
@@ -22,8 +20,7 @@
         : WidgetWindowAgent(*new WidgetWindowAgentPrivate(), parent) {
     }
 
-    WidgetWindowAgent::~WidgetWindowAgent() {
-    }
+    WidgetWindowAgent::~WidgetWindowAgent() = default;
 
     bool WidgetWindowAgent::setup(QWidget *w) {
         Q_ASSERT(w);
@@ -60,6 +57,9 @@
         if (!d->context->setTitleBar(w)) {
             return;
         }
+#ifdef Q_OS_MACOS
+        d->setupMacOSTitleBar(w);
+#endif
         Q_EMIT titleBarWidgetChanged(w);
     }
 

--
Gitblit v1.9.1