mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 20:39:25 +02:00
fixed compilation
git-svn-id: trunk@17871 -
This commit is contained in:
parent
ad6b499676
commit
914a569450
@ -104,7 +104,6 @@ type
|
|||||||
FPrevSibling: TCompOptCondNode;
|
FPrevSibling: TCompOptCondNode;
|
||||||
FValue: string;
|
FValue: string;
|
||||||
FValueType: TCOCValueType;
|
FValueType: TCOCValueType;
|
||||||
function GetChilds(Index: integer): TCompOptCondNode;
|
|
||||||
procedure SetNodeType(const AValue: TCOCNodeType);
|
procedure SetNodeType(const AValue: TCOCNodeType);
|
||||||
procedure SetParent(const AValue: TCompOptCondNode);
|
procedure SetParent(const AValue: TCompOptCondNode);
|
||||||
procedure SetValue(const AValue: string);
|
procedure SetValue(const AValue: string);
|
||||||
@ -180,11 +179,6 @@ end;
|
|||||||
|
|
||||||
{ TCompOptCondNode }
|
{ TCompOptCondNode }
|
||||||
|
|
||||||
function TCompOptCondNode.GetChilds(Index: integer): TCompOptCondNode;
|
|
||||||
begin
|
|
||||||
Result:=TCompOptCondNode(fChilds[Index]);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCompOptCondNode.SetNodeType(const AValue: TCOCNodeType);
|
procedure TCompOptCondNode.SetNodeType(const AValue: TCOCNodeType);
|
||||||
begin
|
begin
|
||||||
if FNodeType=AValue then exit;
|
if FNodeType=AValue then exit;
|
||||||
@ -196,12 +190,12 @@ procedure TCompOptCondNode.SetParent(const AValue: TCompOptCondNode);
|
|||||||
begin
|
begin
|
||||||
if FParent=AValue then exit;
|
if FParent=AValue then exit;
|
||||||
if FParent<>nil then begin
|
if FParent<>nil then begin
|
||||||
FParent.InternalRemoveChild(Self);
|
// ToDo
|
||||||
FParent.Changed;
|
FParent.Changed;
|
||||||
end;
|
end;
|
||||||
FParent:=AValue;
|
FParent:=AValue;
|
||||||
if FParent<>nil then begin
|
if FParent<>nil then begin
|
||||||
FParent.InternalAddChild(Self,Count);
|
// ToDo
|
||||||
FParent.Changed;
|
FParent.Changed;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -238,8 +232,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompOptCondNode.Clear;
|
procedure TCompOptCondNode.Clear;
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
begin
|
||||||
fClearing:=true;
|
fClearing:=true;
|
||||||
while FFirstChild<>nil do
|
while FFirstChild<>nil do
|
||||||
@ -280,8 +272,6 @@ end;
|
|||||||
|
|
||||||
procedure TCompOptCondNode.SaveToXMLConfig(XMLConfig: TXMLConfig;
|
procedure TCompOptCondNode.SaveToXMLConfig(XMLConfig: TXMLConfig;
|
||||||
const Path: string);
|
const Path: string);
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
begin
|
||||||
XMLConfig.SetDeleteValue(Path+'NodeType',COCNodeTypeNames[NodeType],
|
XMLConfig.SetDeleteValue(Path+'NodeType',COCNodeTypeNames[NodeType],
|
||||||
COCNodeTypeNames[cocntNone]);
|
COCNodeTypeNames[cocntNone]);
|
||||||
@ -289,8 +279,7 @@ begin
|
|||||||
COCValueTypeNames[cocvtNone]);
|
COCValueTypeNames[cocvtNone]);
|
||||||
XMLConfig.SetDeleteValue(Path+'Value',Value,'');
|
XMLConfig.SetDeleteValue(Path+'Value',Value,'');
|
||||||
XMLConfig.SetDeleteValue(Path+'ChildCount',Count,0);
|
XMLConfig.SetDeleteValue(Path+'ChildCount',Count,0);
|
||||||
for i:=0 to Count-1 do
|
// ToDo
|
||||||
Childs[i].SaveToXMLConfig(XMLConfig,Path+'Item'+IntToStr(i)+'/');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCompOptConditionals }
|
{ TCompOptConditionals }
|
||||||
@ -299,6 +288,8 @@ function TCompOptConditionals.GetValues(const ValueType: TCOCValueType): string;
|
|||||||
|
|
||||||
function ComputeIfNode(Node: TCompOptCondNode;
|
function ComputeIfNode(Node: TCompOptCondNode;
|
||||||
out ExprResult: boolean): boolean;
|
out ExprResult: boolean): boolean;
|
||||||
|
var
|
||||||
|
ResultStr: String;
|
||||||
begin
|
begin
|
||||||
case Node.NodeType of
|
case Node.NodeType of
|
||||||
cocntIf,cocntElseIf:
|
cocntIf,cocntElseIf:
|
||||||
@ -330,8 +321,8 @@ function TCompOptConditionals.GetValues(const ValueType: TCOCValueType): string;
|
|||||||
begin
|
begin
|
||||||
if not ComputeIfNode(Node,ExprResult) then exit;
|
if not ComputeIfNode(Node,ExprResult) then exit;
|
||||||
if ExprResult then begin
|
if ExprResult then begin
|
||||||
if Node.Count>0 then
|
if Node.FirstChild<>nil then
|
||||||
if not ComputeNode(Node.Childs[0]) then exit;
|
if not ComputeNode(Node.FirstChild) then exit;
|
||||||
// skip till EndIf
|
// skip till EndIf
|
||||||
|
|
||||||
end else begin
|
end else begin
|
||||||
|
Loading…
Reference in New Issue
Block a user