LCL: Reduce warnings by replacing deprecated TField's "Lookup" with "FieldKind=fkLookup".

git-svn-id: trunk@51045 -
This commit is contained in:
juha 2015-12-26 18:55:45 +00:00
parent 1f6def37cc
commit 3d8be36eb6
2 changed files with 5 additions and 5 deletions

View File

@ -1419,7 +1419,7 @@ end;
function FieldIsEditable(Field: TField): boolean; function FieldIsEditable(Field: TField): boolean;
begin begin
result := (Field<>nil) and (not Field.Calculated) and result := (Field<>nil) and (not Field.Calculated) and
(Field.DataType<>ftAutoInc) and (not Field.Lookup) (Field.DataType<>ftAutoInc) and (Field.FieldKind<>fkLookup)
end; end;
function FieldCanAcceptKey(Field: TField; AKey: char): boolean; function FieldCanAcceptKey(Field: TField; AKey: char): boolean;

View File

@ -1230,7 +1230,7 @@ begin
StartUpdating; StartUpdating;
try try
edField.Text := FTempText; edField.Text := FTempText;
if edField.Lookup then if edField.FieldKind = fkLookup then
begin begin
LookupKeyValues := Null; LookupKeyValues := Null;
if edField.LookupCache then if edField.LookupCache then
@ -3267,7 +3267,7 @@ begin
aField := SelectedField; aField := SelectedField;
if aField<>nil then begin if aField<>nil then begin
Result := IsValidChar(AField, Ch) and not aField.Calculated and Result := IsValidChar(AField, Ch) and not aField.Calculated and
(aField.DataType<>ftAutoInc) and (not aField.Lookup) and not aField.IsBlob; (aField.DataType<>ftAutoInc) and (aField.FieldKind<>fkLookup) and not aField.IsBlob;
end; end;
end; end;
end; end;
@ -3288,7 +3288,7 @@ begin
result := not AField.CanModify; result := not AField.CanModify;
// if field is readonly, check if it's a lookup field // if field is readonly, check if it's a lookup field
if result and AField.Lookup then begin if result and (AField.FieldKind = fkLookup) then begin
FieldList := TList.Create; FieldList := TList.Create;
try try
AField.DataSet.GetFieldList(FieldList, AField.KeyFields); AField.DataSet.GetFieldList(FieldList, AField.KeyFields);
@ -4023,7 +4023,7 @@ end;
function TColumn.GetPickList: TStrings; function TColumn.GetPickList: TStrings;
begin begin
Result := inherited GetPickList; Result := inherited GetPickList;
if (Field<>nil) and FField.Lookup then if (Field<>nil) and (FField.FieldKind=fkLookup) then
begin begin
if FField.LookupCache then if FField.LookupCache then
FField.LookupList.ValuesToStrings(Result) FField.LookupList.ValuesToStrings(Result)