mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2026-01-04 04:00:44 +01:00
LCL: Fix the rest of Assert to DebugLn conversion.
git-svn-id: trunk@29837 -
This commit is contained in:
parent
ef4e2fb352
commit
b2fbbd9b34
@ -141,11 +141,10 @@ end;
|
||||
|
||||
procedure EventTrace(const TheMessage : string; data : pointer);
|
||||
begin
|
||||
if Data = nil then
|
||||
// if Data = nil then
|
||||
//DebugLn(Format('Trace:Event [%s] fired',[Themessage]))
|
||||
else
|
||||
//DebugLn(Format('Trace:Event [%s] fired for %s',
|
||||
[TheMessage, TObject(data).Classname]));
|
||||
// else
|
||||
//DebugLn(Format('Trace:Event [%s] fired for %s', [TheMessage, TObject(data).Classname]));
|
||||
end;
|
||||
|
||||
{*************************************************************}
|
||||
|
||||
@ -52,10 +52,10 @@ var
|
||||
Begin
|
||||
Result:=false;
|
||||
if (Time=0) or (Context=nil) or (Widget=nil) then ;
|
||||
if (info = TARGET_ROOTWIN) then
|
||||
if (info = TARGET_ROOTWIN) then begin
|
||||
//DebugLn('Trace:I WAS DROPPED ON THE ROOTWIN')
|
||||
else
|
||||
Begin
|
||||
end
|
||||
else Begin
|
||||
//DebugLn('Trace:*********Setting Data************');
|
||||
Texts := TCustomEdit(data).Text;
|
||||
//DebugLn('Trace:0');
|
||||
|
||||
@ -1736,7 +1736,6 @@ var
|
||||
begin
|
||||
//DebugLn('trace:[TGtkWidgetSet.InternalGetDIBits]');
|
||||
|
||||
|
||||
Result := 0;
|
||||
if (DC=0) or (Usage=0) then ;
|
||||
|
||||
@ -2001,7 +2000,7 @@ begin
|
||||
end;
|
||||
|
||||
{$IFDEF VerboseRawImage}
|
||||
//DebugLn('TGtkWidgetSet.GetWindowRawImageDescription A ',RawImageDescriptionAsString(Desc));
|
||||
DebugLn('TGtkWidgetSet.GetWindowRawImageDescription A ',RawImageDescriptionAsString(Desc));
|
||||
{$ENDIF}
|
||||
|
||||
Result := True;
|
||||
@ -3830,7 +3829,7 @@ begin
|
||||
end;
|
||||
*)
|
||||
else
|
||||
//DebugLn(Format('Trace:ERROR: Signal %d not found!', [AMsg]));
|
||||
DebugLn(Format('Trace:ERROR: Signal %d not found!', [AMsg]));
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -1137,7 +1137,9 @@ begin
|
||||
Result := False;
|
||||
end;
|
||||
end
|
||||
else //DebugLn('Trace:WARNING: [TGtkWidgetSet.CreateCaret] Got null HWND');
|
||||
else begin
|
||||
//DebugLn('Trace:WARNING: [TGtkWidgetSet.CreateCaret] Got null HWND');
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -1849,8 +1851,12 @@ begin
|
||||
end;
|
||||
|
||||
if Result = 0
|
||||
then DebugLn('WARNING: [TGtkWidgetSet.CreateFontIndirectEx] NOT found XLFD: <'+LongFontName+'> Fontname="'+LogFont.lfFaceName+'"')
|
||||
else //DebugLn(Format('Trace: [TGtkWidgetSet.CreateFontIndirectEx] found XLFD: <%s>', [LongFontName]));
|
||||
then
|
||||
DebugLn('WARNING: [TGtkWidgetSet.CreateFontIndirectEx] NOT found XLFD: <'+LongFontName+'> Fontname="'+LogFont.lfFaceName+'"')
|
||||
else begin
|
||||
//DebugLn(Format('Trace: [TGtkWidgetSet.CreateFontIndirectEx] found XLFD: <%s>', [LongFontName]));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
{$EndIf}
|
||||
@ -2362,7 +2368,9 @@ begin
|
||||
Result := False;
|
||||
end;
|
||||
end
|
||||
else //DebugLn('Trace:WARNING: [TGtkWidgetSet.DestroyCaret] Got null HWND');
|
||||
else begin
|
||||
//DebugLn('Trace:WARNING: [TGtkWidgetSet.DestroyCaret] Got null HWND');
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -3023,7 +3031,7 @@ begin
|
||||
if (Str=nil) or (Str[0]=#0) then Exit(0);
|
||||
|
||||
//DebugLn(Format('trace:> [TGtkWidgetSet.DrawText] DC:0x%x, Str:''%s'', Count: %d, Rect = %d,%d,%d,%d, Flags:%d',
|
||||
[DC, Str, Count, Rect.Left, Rect.Top, Rect.Right, Rect.Bottom, Flags]));
|
||||
// [DC, Str, Count, Rect.Left, Rect.Top, Rect.Right, Rect.Bottom, Flags]));
|
||||
|
||||
if not IsValidDC(DC) then Exit(0);
|
||||
if (Count < -1) or (IsRectEmpty(Rect) and ((Flags and DT_CALCRECT) = 0)) then Exit(0);
|
||||
|
||||
@ -851,7 +851,7 @@ begin
|
||||
and (Widget^.Window<>nil)
|
||||
and (WidgetStyle<>nil)
|
||||
then begin
|
||||
if Pixmap <> nil then
|
||||
//if Pixmap <> nil then
|
||||
//DebugLn('Trace:TODO: [GTKAPIWidgetClient_DrawCaret] Implement bitmap');
|
||||
|
||||
if WidgetIsPainting then
|
||||
|
||||
@ -558,7 +558,7 @@ begin
|
||||
//TODO: create classprocedures for this in the corresponding classes
|
||||
|
||||
P := Pointer(AWinControl.Handle);
|
||||
Assert(p = nil, 'Trace:WARNING: [TGtkWidgetSet.SetLabel] --> got nil pointer');
|
||||
Assert(p <> nil, 'Trace:WARNING: [TGtkWidgetSet.SetLabel] --> got nil pointer');
|
||||
//DebugLn('Trace:Setting Str1 in SetLabel');
|
||||
pLabel := pchar(AText);
|
||||
|
||||
|
||||
@ -2103,7 +2103,7 @@ begin
|
||||
|
||||
EventTrace('size-allocate', data);
|
||||
|
||||
with Size^ do //DebugLn(Format('Trace:[gtksize_allocateCB] %s --> X: %d, Y: %d, Width: %d, Height: %d', [TObject(data).ClassName, X, Y, Width, Height]));
|
||||
//with Size^ do DebugLn(Format('Trace:[gtksize_allocateCB] %s --> X: %d, Y: %d, Width: %d, Height: %d', [TObject(data).ClassName, X, Y, Width, Height]));
|
||||
|
||||
if not (TObject(Data) is TControl) then begin
|
||||
// owner is not TControl -> ignore
|
||||
|
||||
@ -52,10 +52,10 @@ var
|
||||
Begin
|
||||
Result:=false;
|
||||
if (Time=0) or (Context=nil) or (Widget=nil) then ;
|
||||
if (info = TARGET_ROOTWIN) then
|
||||
if (info = TARGET_ROOTWIN) then begin
|
||||
//DebugLn('Trace:I WAS DROPPED ON THE ROOTWIN')
|
||||
else
|
||||
Begin
|
||||
end
|
||||
else Begin
|
||||
//DebugLn('Trace:*********Setting Data************');
|
||||
Texts := TCustomEdit(data).Text;
|
||||
//DebugLn('Trace:0');
|
||||
|
||||
@ -2840,7 +2840,6 @@ var
|
||||
begin
|
||||
//DebugLn('trace:[TGtk2WidgetSet.InternalGetDIBits]');
|
||||
|
||||
|
||||
Result := 0;
|
||||
if (DC=0) or (Usage=0) then ;
|
||||
|
||||
@ -3101,7 +3100,7 @@ begin
|
||||
end;
|
||||
|
||||
{$IFDEF VerboseRawImage}
|
||||
//DebugLn('TGtk2WidgetSet.GetWindowRawImageDescription A ',RawImageDescriptionAsString(Desc));
|
||||
DebugLn('TGtk2WidgetSet.GetWindowRawImageDescription A ',RawImageDescriptionAsString(Desc));
|
||||
{$ENDIF}
|
||||
|
||||
Result := True;
|
||||
|
||||
@ -34,8 +34,7 @@ begin
|
||||
Result:=false;
|
||||
if PtrUInt(Str) <= $FFFF then exit; // global atom handle
|
||||
//DebugLn('Trace:PropEnumProc - Start');
|
||||
//DebugLn(Format('Trace:PropEnumProc - Property %S (with value 0x%X) from window 0x%X removed',
|
||||
[String(Str), Data, Window]));
|
||||
//DebugLn(Format('Trace:PropEnumProc - Property %S (with value 0x%X) from window 0x%X removed',[String(Str), Data, Window]));
|
||||
RemoveProp(Window, Str);
|
||||
Result := True;
|
||||
//DebugLn('Trace:PropEnumProc - Exit');
|
||||
|
||||
@ -729,7 +729,7 @@ begin
|
||||
if Result = LB_ERR Then
|
||||
Begin
|
||||
//DebugLn('Trace:[TWinCEWidgetSet.IntSendMessage3] Could not retrieve item index '+
|
||||
'via LM_GETITEMINDEX; try selecting an item first');
|
||||
// 'via LM_GETITEMINDEX; try selecting an item first');
|
||||
Result := -1;
|
||||
End;
|
||||
end;
|
||||
|
||||
@ -387,7 +387,7 @@ Try
|
||||
TmpStr := Nil;
|
||||
Except
|
||||
On E: Exception Do
|
||||
//DebugLn(Format('Trace:Could not deallocate string --> %S', [E.Message]));
|
||||
; //DebugLn(Format('Trace:Could not deallocate string --> %S', [E.Message]));
|
||||
End;
|
||||
|
||||
End.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user