Yuhang Zhao
2023-12-07 005c4e953127365980c6079acc52c874894fba1b
use static_cast instead
2个文件已修改
4 ■■■■ 已修改文件
src/core/contexts/abstractwindowcontext.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/win32windowcontext.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/abstractwindowcontext.cpp
@@ -50,7 +50,7 @@
        // Install specific event filter
        host->installEventFilter(new EventFilterForwarder(
            [](QEvent *event, void *user) {
                return reinterpret_cast<AbstractWindowContext *>(user)->hostEventFilter(event);
                return static_cast<AbstractWindowContext *>(user)->hostEventFilter(event);
            },
            this, this));
src/core/contexts/win32windowcontext.cpp
@@ -408,7 +408,7 @@
            // https://github.com/qt/qtbase/blob/e26a87f1ecc40bc8c6aa5b889fce67410a57a702/src/plugins/platforms/windows/qwindowscontext.cpp#L1546
            // Qt needs to refer to the WM_NCCALCSIZE message data that hasn't been processed, so we
            // have to process it after Qt acquired the initial data.
            auto msg = reinterpret_cast<const MSG *>(message);
            auto msg = static_cast<const MSG *>(message);
            if (msg->message == WM_NCCALCSIZE && orgLastMessageContext) {
                LRESULT res;
                if (Win32WindowContext::nonClientCalcSizeHandler(msg->hwnd, msg->message,