From 755bd03c2046ebcb627960ebb3b27ae3ab280d14 Mon Sep 17 00:00:00 2001 From: deepin-ci-robot Date: Mon, 2 Dec 2024 07:59:26 +0000 Subject: [PATCH] sync: from linuxdeepin/qt5platform-plugins Synchronize source files from linuxdeepin/qt5platform-plugins. Source-pull-request: https://github.com/linuxdeepin/qt5platform-plugins/pull/261 --- src/vtablehook.cpp | 10 +++++----- xcb/dnotitlebarwindowhelper.cpp | 4 ---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/vtablehook.cpp b/src/vtablehook.cpp index 2c4d762..e6920de 100644 --- a/src/vtablehook.cpp +++ b/src/vtablehook.cpp @@ -185,15 +185,15 @@ void VtableHook::autoCleanVtable(const void *obj) if (!fun) return; - typedef void(*Destruct)(const void*); - Destruct destruct = reinterpret_cast(fun); - // call origin destruct function - destruct(obj); - if (hasVtable(obj)) {// 需要判断一下,有可能在执行析构函数时虚表已经被删除 // clean clearGhostVtable(obj); } + + typedef void(*Destruct)(const void*); + Destruct destruct = reinterpret_cast(fun); + // call origin destruct function + destruct(obj); } bool VtableHook::ensureVtable(const void *obj, std::function destoryObjFun) diff --git a/xcb/dnotitlebarwindowhelper.cpp b/xcb/dnotitlebarwindowhelper.cpp index e737769..88465c0 100644 --- a/xcb/dnotitlebarwindowhelper.cpp +++ b/xcb/dnotitlebarwindowhelper.cpp @@ -81,10 +81,6 @@ DNoTitlebarWindowHelper::~DNoTitlebarWindowHelper() { g_pressPoint.remove(this); - if (VtableHook::hasVtable(m_window)) { - VtableHook::resetVtable(m_window); - } - mapped.remove(qobject_cast(parent())); if (m_window->handle()) { // 当本地窗口还存在时,移除设置过的窗口属性