From 653fa1d6f1945defc426de41957f58c0e15b2c9b Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Thu, 12 Jan 2023 09:11:29 +0800 Subject: [PATCH] quick demo: fix for latest qt The onClosing signal was removed in latest qt. Signed-off-by: Yuhang Zhao <2546789017@qq.com> --- examples/quick/ApplicationWindow.qml | 9 ++------- examples/quick/Window.qml | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/examples/quick/ApplicationWindow.qml b/examples/quick/ApplicationWindow.qml index a6d4b8b..3d9675b 100644 --- a/examples/quick/ApplicationWindow.qml +++ b/examples/quick/ApplicationWindow.qml @@ -43,13 +43,8 @@ FramelessApplicationWindow { } return FramelessUtils.defaultSystemLightColor; } - Connections { - target: window - function onClosing(close) - { - Settings.saveGeometry(window) - } - } + + Component.onDestruction: Settings.saveGeometry(window) FramelessHelper.onReady: { // Let FramelessHelper know what's our homemade title bar, otherwise diff --git a/examples/quick/Window.qml b/examples/quick/Window.qml index f318e8e..d6667c8 100644 --- a/examples/quick/Window.qml +++ b/examples/quick/Window.qml @@ -43,13 +43,8 @@ FramelessWindow { } return FramelessUtils.defaultSystemLightColor; } - Connections { - target: window - function onClosing(close) - { - Settings.saveGeometry(window) - } - } + + Component.onDestruction: Settings.saveGeometry(window) FramelessHelper.onReady: { // Let FramelessHelper know what's our homemade title bar, otherwise