From 57c155148acfb1b4c806eee3d0f687ead699ac1f Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 周二, 19 12月 2023 18:51:35 +0800
Subject: [PATCH] minor tweaks

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

diff --git a/src/widgets/widgetitemdelegate.cpp b/src/widgets/widgetitemdelegate.cpp
index d838a0f..07c8aa3 100644
--- a/src/widgets/widgetitemdelegate.cpp
+++ b/src/widgets/widgetitemdelegate.cpp
@@ -78,11 +78,11 @@
         return static_cast<const QWidget *>(host)->windowState();
     }
 
-    void WidgetItemDelegate::setWindowState(QObject *host, const Qt::WindowStates &state) const {
+    void WidgetItemDelegate::setWindowState(QObject *host, Qt::WindowStates state) const {
         static_cast<QWidget *>(host)->setWindowState(state);
     }
 
-    void WidgetItemDelegate::setCursorShape(QObject *host, const Qt::CursorShape shape) const {
+    void WidgetItemDelegate::setCursorShape(QObject *host, Qt::CursorShape shape) const {
         static_cast<QWidget *>(host)->setCursor(QCursor(shape));
     }
 
@@ -94,8 +94,12 @@
         return static_cast<const QWidget *>(host)->windowFlags();
     }
 
-    void WidgetItemDelegate::setWindowFlags(QObject *host, const Qt::WindowFlags &flags) const {
+    void WidgetItemDelegate::setWindowFlags(QObject *host, Qt::WindowFlags flags) const {
         static_cast<QWidget *>(host)->setWindowFlags(flags);
     }
 
+    void WidgetItemDelegate::bringWindowToTop(QObject *host) const {
+        static_cast<QWidget *>(host)->raise();
+    }
+
 }
\ No newline at end of file

--
Gitblit v1.9.1