mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 20:00:25 +02:00
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:
parent
30ab342a20
commit
a4ca4a448f
@ -9,7 +9,8 @@
|
|||||||
{$DEFINE QTCOCOA}
|
{$DEFINE QTCOCOA}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$DEFINE QTSCROLLABLEFORMS}
|
{$DEFINE QTSCROLLABLEFORMS}
|
||||||
{$DEFINE QtUseNativeEventLoop}
|
{removed usage of nativeeventloop because of issue #34982}
|
||||||
|
{.$DEFINE QtUseNativeEventLoop}
|
||||||
{$IFDEF DARWIN}
|
{$IFDEF DARWIN}
|
||||||
{enable this define if you have problems when dialogs are shown behind application}
|
{enable this define if you have problems when dialogs are shown behind application}
|
||||||
{.$DEFINE TQTMESSAGEBOXUSEPARENT}
|
{.$DEFINE TQTMESSAGEBOXUSEPARENT}
|
||||||
|
@ -474,6 +474,12 @@ begin
|
|||||||
ACustomForm := TCustomForm(AWinControl);
|
ACustomForm := TCustomForm(AWinControl);
|
||||||
Widget := TQtMainWindow(AWinControl.Handle);
|
Widget := TQtMainWindow(AWinControl.Handle);
|
||||||
|
|
||||||
|
{$IFNDEF QtUseNativeEventLoop}
|
||||||
|
{issue #34982}
|
||||||
|
if AWinControl.HandleObjectShouldBeVisible and Application.Terminated then
|
||||||
|
exit;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
if AWinControl.HandleObjectShouldBeVisible then
|
if AWinControl.HandleObjectShouldBeVisible then
|
||||||
begin
|
begin
|
||||||
if fsModal in ACustomForm.FormState then
|
if fsModal in ACustomForm.FormState then
|
||||||
|
@ -479,6 +479,13 @@ begin
|
|||||||
|
|
||||||
Widget := TQtMainWindow(AWinControl.Handle);
|
Widget := TQtMainWindow(AWinControl.Handle);
|
||||||
|
|
||||||
|
|
||||||
|
{$IFNDEF QtUseNativeEventLoop}
|
||||||
|
{issue #34982}
|
||||||
|
if AWinControl.HandleObjectShouldBeVisible and Application.Terminated then
|
||||||
|
exit;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
if AWinControl.HandleObjectShouldBeVisible then
|
if AWinControl.HandleObjectShouldBeVisible then
|
||||||
begin
|
begin
|
||||||
if fsModal in TForm(AWinControl).FormState then
|
if fsModal in TForm(AWinControl).FormState then
|
||||||
|
Loading…
Reference in New Issue
Block a user