Qt,Qt5: fixed application hang when terminated but trying to show another form. Now we do not use QtUseNativeEventLoop on qt4 anymore. Issue #34982

git-svn-id: branches/fixes_2_0@60288 -
This commit is contained in:
mattias 2019-02-02 18:44:41 +00:00
parent ef32e7493c
commit 7e5b882e03
3 changed files with 15 additions and 1 deletions

View File

@ -9,7 +9,8 @@
{$DEFINE QTCOCOA}
{$ENDIF}
{$DEFINE QTSCROLLABLEFORMS}
{$DEFINE QtUseNativeEventLoop}
{removed usage of nativeeventloop because of issue #34982}
{.$DEFINE QtUseNativeEventLoop}
{$IFDEF DARWIN}
{enable this define if you have problems when dialogs are shown behind application}
{.$DEFINE TQTMESSAGEBOXUSEPARENT}

View File

@ -474,6 +474,12 @@ begin
ACustomForm := TCustomForm(AWinControl);
Widget := TQtMainWindow(AWinControl.Handle);
{$IFNDEF QtUseNativeEventLoop}
{issue #34982}
if AWinControl.HandleObjectShouldBeVisible and Application.Terminated then
exit;
{$ENDIF}
if AWinControl.HandleObjectShouldBeVisible then
begin
if fsModal in ACustomForm.FormState then

View File

@ -479,6 +479,13 @@ begin
Widget := TQtMainWindow(AWinControl.Handle);
{$IFNDEF QtUseNativeEventLoop}
{issue #34982}
if AWinControl.HandleObjectShouldBeVisible and Application.Terminated then
exit;
{$ENDIF}
if AWinControl.HandleObjectShouldBeVisible then
begin
if fsModal in TForm(AWinControl).FormState then