From e1cbc7a1f19a97c7c00ba32df17b30d4cf32c630 Mon Sep 17 00:00:00 2001
From: Yuhang Zhao <zhaoyuhang@rankyee.com>
Date: 摹曛, 07 12月 2023 17:36:56 +0800
Subject: [PATCH] port sync dwm code

---
 src/widgets/widgetitemdelegate.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/widgets/widgetitemdelegate.cpp b/src/widgets/widgetitemdelegate.cpp
index 974f755..6378f36 100644
--- a/src/widgets/widgetitemdelegate.cpp
+++ b/src/widgets/widgetitemdelegate.cpp
@@ -12,15 +12,15 @@
 
     WidgetItemDelegate::~WidgetItemDelegate() = default;
 
-    QWindow *WidgetItemDelegate::window(QObject *obj) const {
+    QWindow *WidgetItemDelegate::window(const QObject *obj) const {
         return static_cast<const QWidget *>(obj)->windowHandle();
     }
 
-    bool WidgetItemDelegate::isEnabled(QObject *obj) const {
+    bool WidgetItemDelegate::isEnabled(const QObject *obj) const {
         return static_cast<const QWidget *>(obj)->isEnabled();
     }
 
-    bool WidgetItemDelegate::isVisible(QObject *obj) const {
+    bool WidgetItemDelegate::isVisible(const QObject *obj) const {
         return static_cast<const QWidget *>(obj)->isVisible();
     }
 
@@ -31,11 +31,11 @@
         return {originPoint, size};
     }
 
-    QWindow *WidgetItemDelegate::hostWindow(QObject *host) const {
+    QWindow *WidgetItemDelegate::hostWindow(const QObject *host) const {
         return static_cast<const QWidget *>(host)->windowHandle();
     }
 
-    bool WidgetItemDelegate::isHostSizeFixed(QObject *host) const {
+    bool WidgetItemDelegate::isHostSizeFixed(const QObject *host) const {
         const auto widget = static_cast<const QWidget *>(host);
         // "Qt::MSWindowsFixedSizeDialogHint" is used cross-platform actually.
         if (widget->windowFlags() & Qt::MSWindowsFixedSizeDialogHint) {

--
Gitblit v1.9.1