Qt,Qt5: fixed application hang when terminated but trying to show another form. Now we don't use QtUseNativeEventLoop on qt4 anymore. issue #34982

git-svn-id: trunk@60270 -
This commit is contained in:
zeljko 2019-02-01 09:59:25 +00:00
parent 30ab342a20
commit a4ca4a448f
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