mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-05 05:17:25 +01:00
qt: cleanup
git-svn-id: trunk@15160 -
This commit is contained in:
parent
23d472f1ed
commit
1c48ba9013
@ -255,7 +255,6 @@ type
|
||||
private
|
||||
FPenPos: TQtPoint;
|
||||
FOwnPainter: Boolean;
|
||||
FInDestroyObjects: Boolean;
|
||||
SelFont: TQTFont;
|
||||
SelBrush: TQTBrush;
|
||||
SelPen: TQtPen;
|
||||
@ -1609,8 +1608,6 @@ end;
|
||||
|
||||
procedure TQtDeviceContext.CreateObjects;
|
||||
begin
|
||||
FInDestroyObjects := False;
|
||||
|
||||
vFont := TQtFont.Create(False);
|
||||
vFont.Owner := Self;
|
||||
|
||||
@ -1631,9 +1628,6 @@ end;
|
||||
|
||||
procedure TQtDeviceContext.DestroyObjects;
|
||||
begin
|
||||
if FInDestroyObjects then
|
||||
Exit;
|
||||
FInDestroyObjects := True;
|
||||
vFont.Widget := nil;
|
||||
FreeAndNil(vFont);
|
||||
//WriteLn('Destroying brush: ', PtrUInt(vBrush), ' ', ClassName, ' ', PtrUInt(Self));
|
||||
@ -1645,7 +1639,6 @@ begin
|
||||
FreeAndNil(vRegion);
|
||||
vBackgroundBrush.Widget := nil;
|
||||
FreeAndNil(vBackgroundBrush);
|
||||
FInDestroyObjects := False;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -1763,7 +1756,7 @@ begin
|
||||
{$ifdef VerboseQt}
|
||||
writeln('TQtDeviceContext.CreateDCData() ');
|
||||
{$endif}
|
||||
Qpainter_save(Widget);
|
||||
QPainter_save(Widget);
|
||||
Result := nil; // doesn't matter;
|
||||
end;
|
||||
|
||||
@ -2055,7 +2048,7 @@ begin
|
||||
if vFont <> nil then
|
||||
vFont.Widget := QPainter_font(Widget);
|
||||
|
||||
if SelFont=nil then
|
||||
if SelFont = nil then
|
||||
Result := vFont
|
||||
else
|
||||
Result := SelFont;
|
||||
@ -2142,7 +2135,7 @@ begin
|
||||
if vPen <> nil then
|
||||
vPen.Widget := QPainter_pen(Widget);
|
||||
|
||||
if SelPen=nil then
|
||||
if SelPen = nil then
|
||||
Result := vPen
|
||||
else
|
||||
Result := SelPen;
|
||||
@ -3262,3 +3255,4 @@ end.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -804,14 +804,12 @@ begin
|
||||
|
||||
APaintEngine := QImage_paintEngine(TQtImage(AObject).Handle);
|
||||
|
||||
if (APaintEngine <> NiL)
|
||||
and QPaintEngine_isActive(APaintEngine) then
|
||||
if (APaintEngine <> nil) and QPaintEngine_isActive(APaintEngine) then
|
||||
begin
|
||||
APainter := QPaintEngine_painter(APaintEngine);
|
||||
if APainter <> nil then
|
||||
QPainter_end(APainter);
|
||||
end ;
|
||||
|
||||
end;
|
||||
end
|
||||
{------------------------------------------------------------------------------
|
||||
Region
|
||||
@ -851,19 +849,6 @@ begin
|
||||
AObject.Free;
|
||||
end;
|
||||
|
||||
// Find out if we want to release internal GDI object
|
||||
{ case GDIType of
|
||||
gdiBrush:
|
||||
gdiBitmap:
|
||||
gdiPen:
|
||||
gdiRegion:
|
||||
gdiPalette:
|
||||
else begin
|
||||
Result:= false;
|
||||
DebugLn('[TGtkWidgetSet.DeleteObject] TODO : Unimplemented GDI type');
|
||||
Assert(False, 'Trace:TODO : Unimplemented GDI object in delete object');
|
||||
end;}
|
||||
|
||||
{$ifdef VerboseQtWinAPI}
|
||||
WriteLn('Trace:< [WinAPI DeleteObject] Result=', dbgs(Result), ' ObjectType=', ObjType);
|
||||
{$endif}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user