From d0e03bf19c3c7f05d27cf83aa1848076c2f905a9 Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Sat, 27 Jun 2020 14:21:48 +0800 Subject: [PATCH] Remove some leftover. Amends last commit. Signed-off-by: Yuhang Zhao <2546789017@qq.com> --- winnativeeventfilter.cpp | 10 +++++----- winnativeeventfilter.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/winnativeeventfilter.cpp b/winnativeeventfilter.cpp index 4c89c39..84c26cc 100644 --- a/winnativeeventfilter.cpp +++ b/winnativeeventfilter.cpp @@ -1770,7 +1770,7 @@ void WinNativeEventFilter::moveWindowToDesktopCenter(const HWND handle) } } -void WinNativeEventFilter::updateQtFrame(QWindow *const window, const int titleBarHeight) +void WinNativeEventFilter::updateQtFrame(QWindow *window, const int titleBarHeight) { if (window && (titleBarHeight > 0)) { // Reduce top frame to zero since we paint it ourselves. Use @@ -1781,7 +1781,7 @@ void WinNativeEventFilter::updateQtFrame(QWindow *const window, const int titleB // window. window->setProperty("_q_windowsCustomMargins", marginsVar); // If a platform window exists, change via native interface. - QPlatformWindow *const platformWindow = window->handle(); + QPlatformWindow *platformWindow = window->handle(); if (platformWindow) { QGuiApplication::platformNativeInterface() ->setWindowProperty(platformWindow, @@ -1797,16 +1797,16 @@ void WinNativeEventFilter::updateQtFrame_internal(const HWND handle) if (handle && m_lpIsWindow(handle)) { const int tbh = getSystemMetric(handle, SystemMetric::TitleBarHeight); #ifdef QT_WIDGETS_LIB - const QWidget *const widget = QWidget::find(reinterpret_cast(handle)); + const QWidget *widget = QWidget::find(reinterpret_cast(handle)); if (widget && widget->isTopLevel()) { - QWindow *const window = widget->windowHandle(); + QWindow *window = widget->windowHandle(); if (window) { updateQtFrame(window, tbh); return; } } #endif - QWindow *const window = findQWindowFromRawHandle(handle); + QWindow *window = findQWindowFromRawHandle(handle); if (window) { updateQtFrame(window, tbh); } diff --git a/winnativeeventfilter.h b/winnativeeventfilter.h index 85fb83b..797df9d 100644 --- a/winnativeeventfilter.h +++ b/winnativeeventfilter.h @@ -131,7 +131,7 @@ public: // Update Qt's internal data about the window frame, otherwise Qt will // take the size of the window frame into account when anyone is trying to // change the geometry of the window. That's not what we want. - static void updateQtFrame(QWindow *const window, const int titleBarHeight); + static void updateQtFrame(QWindow *window, const int titleBarHeight); #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override;