From 23b40dd231913a0a2f843a99fdd0aa76c0e1cdea Mon Sep 17 00:00:00 2001
From: zty199 <46324746+zty199@users.noreply.github.com>
Date: Wed, 21 Dec 2022 17:34:08 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=85=B3=E4=BA=8E?=
 =?UTF-8?q?=E7=AA=97=E5=8F=A3=E8=A2=AB=E4=B8=BB=E7=AA=97=E5=8F=A3=E9=81=AE?=
 =?UTF-8?q?=E6=8C=A1=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Application::initAboutDialog 执行过早,qApp->activeWindow() 指针为空,关于窗口没有父对象,与主窗口互相抢占焦点

Log: 去除 Application 构造函数中调用 initAboutDialog 操作;handleAboutAction 中,若 aboutDialog() 指针不为空则 return
---
 spark-webapp-runtime/application.cpp | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/spark-webapp-runtime/application.cpp b/spark-webapp-runtime/application.cpp
index 63b9dc9..290afa7 100644
--- a/spark-webapp-runtime/application.cpp
+++ b/spark-webapp-runtime/application.cpp
@@ -26,8 +26,6 @@ Application::Application(int &argc, char **argv)
     setProductName(DEFAULT_TITLE);
     setApplicationDisplayName(DEFAULT_TITLE);
     setApplicationLicense(" <a href='https://www.gnu.org/licenses/gpl-3.0.html'>GPLv3</a> ");
-
-    initAboutDialog();
 }
 
 void Application::handleAboutAction()
@@ -109,6 +107,5 @@ void Application::slotMainWindowClose()
 {
     if (aboutDialog()) {
         aboutDialog()->close();
-        aboutDialog()->deleteLater();
     }
 }