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/quick/quickitemdelegate.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/quick/quickitemdelegate.cpp b/src/quick/quickitemdelegate.cpp
index 8165ff8..7bd1259 100644
--- a/src/quick/quickitemdelegate.cpp
+++ b/src/quick/quickitemdelegate.cpp
@@ -10,7 +10,7 @@
 
     QuickItemDelegate::~QuickItemDelegate() = default;
 
-    QWindow *QuickItemDelegate::window(const QObject *obj) const {
+    QWindow *QuickItemDelegate::window(QObject *obj) const {
         return static_cast<const QQuickItem *>(obj)->window();
     }
 
@@ -29,8 +29,8 @@
         return QRectF(originPoint, size).toRect();
     }
 
-    QWindow *QuickItemDelegate::hostWindow(const QObject *host) const {
-        return static_cast<QQuickWindow *>(const_cast<QObject *>(host));
+    QWindow *QuickItemDelegate::hostWindow(QObject *host) const {
+        return static_cast<QQuickWindow *>(host);
     }
 
     bool QuickItemDelegate::isHostSizeFixed(const QObject *host) const {
@@ -39,7 +39,7 @@
     }
 
     bool QuickItemDelegate::isWindowActive(const QObject *host) const {
-        return static_cast<QQuickWindow *>(const_cast<QObject *>(host))->isActive();
+        return static_cast<const QQuickWindow *>(host)->isActive();
     }
 
 }
\ No newline at end of file

--
Gitblit v1.9.1