mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 20:44:03 +02:00
Qt5: simplified code
git-svn-id: trunk@62899 -
This commit is contained in:
parent
6ae0f6b158
commit
f49d5ee891
@ -747,14 +747,11 @@ end;
|
|||||||
|
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TQtWidgetSet.CreateRectRgn(X1,Y1,X2,Y2 : Integer): HRGN;
|
function TQtWidgetSet.CreateRectRgn(X1,Y1,X2,Y2 : Integer): HRGN;
|
||||||
var
|
|
||||||
QtRegion: TQtRegion;
|
|
||||||
begin
|
begin
|
||||||
QtRegion := TQtRegion.Create(True, X1, Y1, X2, Y2);
|
Result := HRGN(TQtRegion.Create(True, X1, Y1, X2, Y2));
|
||||||
Result := HRGN(QtRegion);
|
|
||||||
{$ifdef VerboseQtWinAPI}
|
{$ifdef VerboseQtWinAPI}
|
||||||
WriteLn('Trace: [WinAPI CreateRectRgn] Result: ', dbghex(Result),
|
WriteLn('Trace: [WinAPI CreateRectRgn] Result: ', dbghex(Result),
|
||||||
' QRegionH: ', dbghex(PtrInt(QtRegion.Widget)));
|
' QRegionH: ', dbghex(PtrUInt(TQtRegion(Result).Widget)));
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -789,6 +786,7 @@ begin
|
|||||||
if not IsValidDC(hDC) then exit;
|
if not IsValidDC(hDC) then exit;
|
||||||
|
|
||||||
TQtDeviceContext(hDC).Free;
|
TQtDeviceContext(hDC).Free;
|
||||||
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user