mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 01:19:29 +02:00
LazUtils: Masks: make TWindowsMaskList.Quirks read/write.
This commit is contained in:
parent
3be1973992
commit
cf6d6c626c
@ -335,6 +335,7 @@ type
|
|||||||
TWindowsMaskList = class(TMaskList)
|
TWindowsMaskList = class(TMaskList)
|
||||||
private
|
private
|
||||||
fWindowsQuirks: TWindowsQuirks;
|
fWindowsQuirks: TWindowsQuirks;
|
||||||
|
procedure SetQuirks(AValue: TWindowsQuirks);
|
||||||
protected
|
protected
|
||||||
function GetMaskClass: TMaskClass; override;
|
function GetMaskClass: TMaskClass; override;
|
||||||
procedure AddMasksToList(const aValue: String; aSeparator: Char; CaseSensitive: Boolean;
|
procedure AddMasksToList(const aValue: String; aSeparator: Char; CaseSensitive: Boolean;
|
||||||
@ -353,7 +354,7 @@ type
|
|||||||
deprecated 'Use a TWindowsMaskList instead.';
|
deprecated 'Use a TWindowsMaskList instead.';
|
||||||
|
|
||||||
|
|
||||||
property Quirks: TWindowsQuirks read fWindowsQuirks;
|
property Quirks: TWindowsQuirks read fWindowsQuirks write SetQuirks;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function MatchesMask(const FileName, Mask: String; CaseSensitive: Boolean=False;
|
function MatchesMask(const FileName, Mask: String; CaseSensitive: Boolean=False;
|
||||||
@ -510,6 +511,14 @@ end;
|
|||||||
|
|
||||||
{ TWindowsMaskList }
|
{ TWindowsMaskList }
|
||||||
|
|
||||||
|
procedure TWindowsMaskList.SetQuirks(AValue: TWindowsQuirks);
|
||||||
|
begin
|
||||||
|
if fWindowsQuirks = AValue then Exit;
|
||||||
|
fWindowsQuirks := AValue;
|
||||||
|
fMasks.Clear;
|
||||||
|
AddMasksToList(fMask, fSeparator, fCaseSensitive, fMaskOpCodes);
|
||||||
|
end;
|
||||||
|
|
||||||
function TWindowsMaskList.GetMaskClass: TMaskClass;
|
function TWindowsMaskList.GetMaskClass: TMaskClass;
|
||||||
begin
|
begin
|
||||||
Result := TWindowsMask;
|
Result := TWindowsMask;
|
||||||
@ -535,7 +544,7 @@ constructor TWindowsMaskList.Create(const aValue: String; aSeparator: Char;
|
|||||||
CaseSensitive: Boolean; aOpcodesAllowed: TMaskOpCodes;
|
CaseSensitive: Boolean; aOpcodesAllowed: TMaskOpCodes;
|
||||||
aWindowsQuirksAllowed: TWindowsQuirks);
|
aWindowsQuirksAllowed: TWindowsQuirks);
|
||||||
begin
|
begin
|
||||||
FWindowsQuirks := aWindowsQuirksAllowed;
|
fWindowsQuirks := aWindowsQuirksAllowed;
|
||||||
inherited Create(aValue, aSeparator, CaseSensitive, aOpcodesAllowed);
|
inherited Create(aValue, aSeparator, CaseSensitive, aOpcodesAllowed);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user