From 3bde231e6d0b1c177c8c1fc4eccb6207d40aeec1 Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 周一, 25 12月 2023 00:59:34 +0800
Subject: [PATCH] Test on MinGW

---
 src/widgets/widgetwindowagent.cpp |   18 ++++--------------
 1 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/src/widgets/widgetwindowagent.cpp b/src/widgets/widgetwindowagent.cpp
index ff76aef..b510efb 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);
@@ -39,9 +36,7 @@
         w->setAttribute(Qt::WA_DontCreateNativeAncestors);
         w->setAttribute(Qt::WA_NativeWindow);
 
-        if (!d->setup(w, new WidgetItemDelegate())) {
-            return false;
-        }
+        d->setup(w, new WidgetItemDelegate());
         d->hostWidget = w;
 
 #ifdef Q_OS_WINDOWS
@@ -84,11 +79,6 @@
     void WidgetWindowAgent::setHitTestVisible(const QWidget *w, bool visible) {
         Q_D(WidgetWindowAgent);
         d->context->setHitTestVisible(w, visible);
-    }
-
-    void WidgetWindowAgent::setHitTestVisible(const QRect &rect, bool visible) {
-        Q_D(WidgetWindowAgent);
-        d->context->setHitTestVisible(rect, visible);
     }
 
     WidgetWindowAgent::WidgetWindowAgent(WidgetWindowAgentPrivate &d, QObject *parent)

--
Gitblit v1.9.1