mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-07 05:18:17 +02:00
LazUtils: Masks: when setting Mask property invalidate fInternalMask.
This commit is contained in:
parent
421f894acb
commit
dd4c515dc6
@ -230,6 +230,7 @@ type
|
|||||||
procedure AddRange(lFirstRange, lSecondRange: Integer);
|
procedure AddRange(lFirstRange, lSecondRange: Integer);
|
||||||
procedure CompileRange;
|
procedure CompileRange;
|
||||||
procedure ReverseRange(lFirstRange, lSecondRange: Integer);
|
procedure ReverseRange(lFirstRange, lSecondRange: Integer);
|
||||||
|
procedure SetOriginalMask(AValue: String);
|
||||||
protected
|
protected
|
||||||
fOriginalMask: String;
|
fOriginalMask: String;
|
||||||
class function CompareUTF8Sequences(const P1,P2: PChar): integer; static;
|
class function CompareUTF8Sequences(const P1,P2: PChar): integer; static;
|
||||||
@ -246,7 +247,7 @@ type
|
|||||||
function MatchesWindowsMask(const AFileName: String): Boolean;
|
function MatchesWindowsMask(const AFileName: String): Boolean;
|
||||||
deprecated 'Create with TMaskWindows.Create, then call Matches.'; // in Lazarus 2.3, remove in 2.5.
|
deprecated 'Create with TMaskWindows.Create, then call Matches.'; // in Lazarus 2.3, remove in 2.5.
|
||||||
public
|
public
|
||||||
property Mask: String read fOriginalMask write fOriginalMask;
|
property Mask: String read fOriginalMask write SetOriginalMask;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TMask = class(TMaskUTF8);
|
TMask = class(TMaskUTF8);
|
||||||
@ -254,6 +255,8 @@ type
|
|||||||
{ TWindowsMaskUTF8 }
|
{ TWindowsMaskUTF8 }
|
||||||
|
|
||||||
TWindowsMaskUTF8=class(TMask)
|
TWindowsMaskUTF8=class(TMask)
|
||||||
|
private
|
||||||
|
procedure SetWindowsMask(AValue: String);
|
||||||
protected
|
protected
|
||||||
fWindowsQuirkAllowed: TWindowsQuirks;
|
fWindowsQuirkAllowed: TWindowsQuirks;
|
||||||
fWindowsQuirkInUse: TWindowsQuirks;
|
fWindowsQuirkInUse: TWindowsQuirks;
|
||||||
@ -267,7 +270,7 @@ type
|
|||||||
procedure Compile; override;
|
procedure Compile; override;
|
||||||
function Matches(const aFileName: String): Boolean; override;
|
function Matches(const aFileName: String): Boolean; override;
|
||||||
public
|
public
|
||||||
property Mask: String read fWindowsMask write fWindowsMask;
|
property Mask: String read fWindowsMask write SetWindowsMask;
|
||||||
property Quirks: TWindowsQuirks read fWindowsQuirkAllowed;// write fWindowsQuirkAllowed;
|
property Quirks: TWindowsQuirks read fWindowsQuirkAllowed;// write fWindowsQuirkAllowed;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -703,6 +706,13 @@ begin
|
|||||||
fMaskInd:=lSecondRange;
|
fMaskInd:=lSecondRange;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMaskUTF8.SetOriginalMask(AValue: String);
|
||||||
|
begin
|
||||||
|
if fOriginalMask = AValue then Exit;
|
||||||
|
fOriginalMask := AValue;
|
||||||
|
fMaskIsCompiled := False;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMaskUTF8.CompileRange;
|
procedure TMaskUTF8.CompileRange;
|
||||||
function IsARange(aPosition: integer; out aFirstSequence: integer; out aSecondSequence: integer): Boolean;// {$IFDEF USE_INLINE}inline;{$ENDIF}
|
function IsARange(aPosition: integer; out aFirstSequence: integer; out aSecondSequence: integer): Boolean;// {$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
var
|
var
|
||||||
@ -1137,6 +1147,13 @@ end;
|
|||||||
|
|
||||||
{ TWindowsMask }
|
{ TWindowsMask }
|
||||||
|
|
||||||
|
procedure TWindowsMaskUTF8.SetWindowsMask(AValue: String);
|
||||||
|
begin
|
||||||
|
if fWindowsMask = AValue then Exit;
|
||||||
|
fWindowsMask := AValue;
|
||||||
|
fMaskIsCompiled := False;
|
||||||
|
end;
|
||||||
|
|
||||||
class procedure TWindowsMaskUTF8.SplitFileNameExtension(
|
class procedure TWindowsMaskUTF8.SplitFileNameExtension(
|
||||||
const aSourceFileName: String; out aFileName: String;
|
const aSourceFileName: String; out aFileName: String;
|
||||||
out aExtension: String; aIsMask: Boolean);
|
out aExtension: String; aIsMask: Boolean);
|
||||||
|
Loading…
Reference in New Issue
Block a user