mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 14:38:01 +02:00
Qt5,Qt6: Seem that QEventDestroy does not work anymore for qt5 and qt6. issue #41433
This commit is contained in:
parent
740f63fe4c
commit
df31c25382
@ -671,7 +671,6 @@ type
|
||||
ScrollArea: TQtWindowArea;
|
||||
{$ENDIF}
|
||||
destructor Destroy; override;
|
||||
procedure Destroyed; cdecl; override;
|
||||
procedure BeginUpdate; override;
|
||||
procedure EndUpdate; override;
|
||||
|
||||
@ -2381,7 +2380,17 @@ begin
|
||||
end;
|
||||
|
||||
procedure TQtWidget.Destroyed; cdecl;
|
||||
var
|
||||
Msg: TLMessage;
|
||||
begin
|
||||
//QEventDestroy does not trigger in Qt5 and Qt6 so we must finish here.
|
||||
//see issue #41433.
|
||||
if Assigned(LCLObject) then
|
||||
begin
|
||||
FillChar(Msg{%H-}, SizeOf(Msg), #0);
|
||||
Msg.Msg := LM_DESTROY;
|
||||
DeliverMessage(Msg);
|
||||
end;
|
||||
Widget := nil;
|
||||
Release;
|
||||
end;
|
||||
@ -7418,20 +7427,6 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TQtMainWindow.Destroyed; cdecl;
|
||||
begin
|
||||
//this is event from qt, must inform LCL about it. issue #41433
|
||||
//when non modal popup is shown over modal form and modal form = real popup parent
|
||||
//if popup form, and modal form is closed on button close then qt releases
|
||||
//popup form automatically, so all we have todo is inform LCL.
|
||||
if Assigned(LCLObject) and (LCLObject.Parent = nil) and not IsMdiChild then
|
||||
begin
|
||||
Widget := nil;
|
||||
SlotDestroy;
|
||||
end else
|
||||
inherited Destroyed;
|
||||
end;
|
||||
|
||||
procedure TQtMainWindow.BeginUpdate;
|
||||
begin
|
||||
inherited BeginUpdate;
|
||||
|
@ -669,7 +669,6 @@ type
|
||||
ScrollArea: TQtWindowArea;
|
||||
{$ENDIF}
|
||||
destructor Destroy; override;
|
||||
procedure Destroyed; cdecl; override;
|
||||
|
||||
procedure BeginUpdate; override;
|
||||
procedure EndUpdate; override;
|
||||
@ -2378,7 +2377,17 @@ begin
|
||||
end;
|
||||
|
||||
procedure TQtWidget.Destroyed; cdecl;
|
||||
var
|
||||
Msg: TLMessage;
|
||||
begin
|
||||
//QEventDestroy does not trigger in Qt5 and Qt6 so we must finish here.
|
||||
//see issue #41433.
|
||||
if Assigned(LCLObject) then
|
||||
begin
|
||||
FillChar(Msg{%H-}, SizeOf(Msg), #0);
|
||||
Msg.Msg := LM_DESTROY;
|
||||
DeliverMessage(Msg);
|
||||
end;
|
||||
Widget := nil;
|
||||
Release;
|
||||
end;
|
||||
@ -7369,20 +7378,6 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TQtMainWindow.Destroyed; cdecl;
|
||||
begin
|
||||
//this is event from qt, must inform LCL about it. issue #41433
|
||||
//when non modal popup is shown over modal form and modal form = real popup parent
|
||||
//if popup form, and modal form is closed on button close then qt releases
|
||||
//popup form automatically, so all we have todo is inform LCL.
|
||||
if Assigned(LCLObject) and (LCLObject.Parent = nil) and not IsMdiChild then
|
||||
begin
|
||||
Widget := nil;
|
||||
SlotDestroy;
|
||||
end else
|
||||
inherited Destroyed;
|
||||
end;
|
||||
|
||||
procedure TQtMainWindow.BeginUpdate;
|
||||
begin
|
||||
inherited BeginUpdate;
|
||||
|
Loading…
Reference in New Issue
Block a user