mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 19:19:18 +02:00
LCL: Reduce warnings by replacing deprecated TField's "Lookup" with "FieldKind=fkLookup".
git-svn-id: trunk@51045 -
This commit is contained in:
parent
1f6def37cc
commit
3d8be36eb6
@ -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;
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user