From 3fac147485bd5afc1e6bc1a827c5c36345f66dff Mon Sep 17 00:00:00 2001 From: deepin-ci-robot Date: Wed, 8 Jan 2025 13:34:23 +0000 Subject: [PATCH] sync: from linuxdeepin/dtkgui Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: https://github.com/linuxdeepin/dtkgui/pull/296 --- .../platform/treeland/dtreelandplatformwindowinterface.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/platform/treeland/dtreelandplatformwindowinterface.cpp b/src/plugins/platform/treeland/dtreelandplatformwindowinterface.cpp index 3c327a0..423ea14 100644 --- a/src/plugins/platform/treeland/dtreelandplatformwindowinterface.cpp +++ b/src/plugins/platform/treeland/dtreelandplatformwindowinterface.cpp @@ -51,7 +51,7 @@ MoveWindowHelper::MoveWindowHelper(QWindow *window) MoveWindowHelper::~MoveWindowHelper() { - mapped.remove(qobject_cast(parent())); + mapped.remove(static_cast(parent())); } void MoveWindowHelper::updateEnableSystemMoveFromProperty() @@ -178,7 +178,8 @@ DTreeLandPlatformWindowHelper::DTreeLandPlatformWindowHelper(QWindow *window) DTreeLandPlatformWindowHelper::~DTreeLandPlatformWindowHelper() { - windowMap.remove(window()); + // see tst_qwindow.cpp tst_QWindow::qobject_castOnDestruction() + windowMap.remove(static_cast(parent())); } bool DTreeLandPlatformWindowHelper::eventFilter(QObject *watched, QEvent *event) {