From 499afac952920595e6c3d4f94806427f894c7674 Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 周六, 02 12月 2023 19:05:24 +0800
Subject: [PATCH] optimize code

---
 src/core/windowitemdelegate.h |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/core/windowitemdelegate.h b/src/core/windowitemdelegate.h
index 9886fa5..985dedc 100644
--- a/src/core/windowitemdelegate.h
+++ b/src/core/windowitemdelegate.h
@@ -1,6 +1,8 @@
 #ifndef WINDOWITEMDELEGATE_H
 #define WINDOWITEMDELEGATE_H
 
+#include <memory>
+
 #include <QtCore/QObject>
 #include <QtGui/QWindow>
 
@@ -9,8 +11,6 @@
 namespace QWK {
 
     class WindowItemDelegate {
-        Q_DISABLE_COPY(WindowItemDelegate)
-
     public:
         WindowItemDelegate() = default;
         virtual ~WindowItemDelegate() = default;
@@ -20,9 +20,10 @@
 
         virtual bool isEnabled(QObject *obj) const = 0;
         virtual bool isVisible(QObject *obj) const = 0;
-    };
 
-    using WindowItemDelegatePtr = std::shared_ptr<WindowItemDelegate>;
+    private:
+        Q_DISABLE_COPY_MOVE(WindowItemDelegate)
+    };
 
 }
 

--
Gitblit v1.9.1