Qt: performance boost in resize() & move() when setted up from LCL.

git-svn-id: trunk@24052 -
This commit is contained in:
zeljko 2010-03-16 21:23:07 +00:00
parent 6691b52da8
commit d2280da4c6
2 changed files with 15 additions and 4 deletions

View File

@ -2668,6 +2668,10 @@ begin
WriteLn('TQtWidget.SlotMove');
{$endif}
// do not loop with LCL
if InUpdate then
exit;
if not QEvent_spontaneous(Event) or
(not QEvent_spontaneous(Event) and
((Self is TQtMainWindow) and not
@ -2814,6 +2818,10 @@ begin
);
}
if not Assigned(LCLObject) then exit;
// do not loop with LCL
if InUpdate then
exit;
if (NewSize.cx <> LCLObject.Width) or (NewSize.cy <> LCLObject.Height) or
(LCLObject.ClientRectNeedsInterfaceUpdate) then

View File

@ -321,7 +321,6 @@ begin
Result := False;
if not WSCheckHandleAllocated(AWinControl, 'GetDesignInteractive') then
Exit;
Result := False;
end;
class procedure TQtWSWinControl.SetBiDiMode(const AWinControl : TWinControl;
@ -463,9 +462,10 @@ class procedure TQtWSWinControl.SetBounds(const AWinControl: TWinControl;
begin
if not WSCheckHandleAllocated(AWincontrol, 'SetBounds') then
Exit;
TQtWidget(AWinControl.Handle).BeginUpdate;
TQtWidget(AWinControl.Handle).move(ALeft, ATop);
TQtWidget(AWinControl.Handle).resize(AWidth, AHeight);
TQtWidget(AWinControl.Handle).EndUpdate;
end;
{------------------------------------------------------------------------------
@ -481,8 +481,10 @@ class procedure TQtWSWinControl.SetPos(const AWinControl: TWinControl;
begin
if not WSCheckHandleAllocated(AWincontrol, 'SetPos') then
Exit;
TQtWidget(AWinControl.Handle).BeginUpdate;
TQtWidget(AWinControl.Handle).move(ALeft, ATop);
TQtWidget(AWinControl.Handle).EndUpdate;
end;
{------------------------------------------------------------------------------
@ -498,8 +500,9 @@ class procedure TQtWSWinControl.SetSize(const AWinControl: TWinControl;
begin
if not WSCheckHandleAllocated(AWincontrol, 'SetSize') then
Exit;
TQtWidget(AWinControl.Handle).BeginUpdate;
TQtWidget(AWinControl.Handle).resize(AWidth, AHeight);
TQtWidget(AWinControl.Handle).EndUpdate;
end;
{------------------------------------------------------------------------------