Qt: follow Qt5 with WinIDNeeded function. part of #36897

git-svn-id: trunk@62950 -
This commit is contained in:
zeljko 2020-04-11 19:37:55 +00:00
parent 8e1d2ca2e9
commit 45725b103e

View File

@ -179,6 +179,7 @@ type
procedure Release; override; procedure Release; override;
procedure Destroyed; cdecl; override; procedure Destroyed; cdecl; override;
public public
function WinIDNeeded: boolean; virtual;
function CanAdjustClientRectOnResize: Boolean; virtual; function CanAdjustClientRectOnResize: Boolean; virtual;
function CanChangeFontColor: Boolean; virtual; function CanChangeFontColor: Boolean; virtual;
function CanSendLCLMessage: Boolean; function CanSendLCLMessage: Boolean;
@ -704,6 +705,7 @@ type
property IsFrameWindow: Boolean read FIsFrameWindow write FIsFrameWindow; {check if our LCLObject is TCustomFrame} property IsFrameWindow: Boolean read FIsFrameWindow write FIsFrameWindow; {check if our LCLObject is TCustomFrame}
property ShowOnTaskBar: Boolean read FShowOnTaskBar; property ShowOnTaskBar: Boolean read FShowOnTaskBar;
public public
function WinIDNeeded: boolean; override;
procedure AttachEvents; override; procedure AttachEvents; override;
procedure DetachEvents; override; procedure DetachEvents; override;
function CWEventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl; function CWEventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl;
@ -717,6 +719,7 @@ type
protected protected
function CreateWidget(const AParams: TCreateParams): QWidgetH; override; function CreateWidget(const AParams: TCreateParams): QWidgetH; override;
public public
function WinIDNeeded: boolean; override;
procedure InitializeWidget; override; procedure InitializeWidget; override;
procedure DeInitializeWidget; override; procedure DeInitializeWidget; override;
function CanPaintBackground: Boolean; override; function CanPaintBackground: Boolean; override;
@ -2272,6 +2275,11 @@ begin
Release; Release;
end; end;
function TQtWidget.WinIDNeeded: boolean;
begin
Result := False;
end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Function: TQtWidget.CanAdjustClientRectOnResize Function: TQtWidget.CanAdjustClientRectOnResize
Params: None Params: None
@ -8185,6 +8193,17 @@ begin
UpdateParent; UpdateParent;
end; end;
function TQtMainWindow.WinIDNeeded: boolean;
begin
Result := False;
{$IFDEF HASX11}
if Assigned(LCLObject) and not IsFormDesign(LCLObject) and
not IsMdiChild and (LCLObject.Parent = nil) and not testAttribute(QtWA_Mapped) and
QWidget_isTopLevel(Widget) then
Result := True;
{$ENDIF}
end;
procedure TQtMainWindow.AttachEvents; procedure TQtMainWindow.AttachEvents;
begin begin
inherited AttachEvents; inherited AttachEvents;
@ -18424,6 +18443,11 @@ begin
{$ENDIF} {$ENDIF}
end; end;
function TQtHintWindow.WinIDNeeded: boolean;
begin
Result := False;
end;
procedure TQtHintWindow.InitializeWidget; procedure TQtHintWindow.InitializeWidget;
begin begin
inherited InitializeWidget; inherited InitializeWidget;