From 971885c68ab63098c24f796ac54bf6c441da2312 Mon Sep 17 00:00:00 2001 From: n7800 <14154601-n7800@users.noreply.gitlab.com> Date: Wed, 5 Mar 2025 22:50:05 +0500 Subject: [PATCH] IdeConfig: Always check the skcAll key in GetSkipCheckByKey function --- components/macroscript/registerems.pas | 2 +- ide/ideinstances.pas | 2 +- ide/main.pp | 4 ++-- ide/packages/ideconfig/idecmdline.pas | 5 +++-- packager/pkgmanager.pas | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/components/macroscript/registerems.pas b/components/macroscript/registerems.pas index 368d21371d..cccc344cca 100644 --- a/components/macroscript/registerems.pas +++ b/components/macroscript/registerems.pas @@ -31,7 +31,7 @@ begin if not EMSSupported then {%H-}exit; - if not (GetSkipCheckByKey('MacroScript') or GetSkipCheckByKey('All')) then begin + if not GetSkipCheckByKey('MacroScript') then begin conf := GetEMSConf; try diff --git a/ide/ideinstances.pas b/ide/ideinstances.pas index 966c873a6e..e022f8ff8e 100644 --- a/ide/ideinstances.pas +++ b/ide/ideinstances.pas @@ -743,7 +743,7 @@ var I: Integer; begin FForceNewInstance := CheckParamsForForceNewInstanceOpt; - FSkipAllChecks := GetSkipCheck(skcUniqueInstance) or GetSkipCheck(skcAll); + FSkipAllChecks := GetSkipCheck(skcUniqueInstance); //get cmd line filenames FFilesToOpen := ExtractCmdLineFilenames; diff --git a/ide/main.pp b/ide/main.pp index 4d185fe28d..44c65f638e 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -1301,7 +1301,7 @@ begin end; end else - if (not (GetSkipCheck(skcLastCalled) or GetSkipCheck(skcAll)) ) and + if (not GetSkipCheck(skcLastCalled)) and (CompareFilenames(LastCalled,CurPrgName)<>0) and (CompareFilenames(LastCalled,AltPrgName)<>0) and (CompareFilenames(CurPrgName,AltPrgName)<>0) // we can NOT check, if we only have the path inside the PCP @@ -1434,7 +1434,7 @@ begin ShowSetupDialog:=true; {$ENDIF} - SkipAllTests := GetSkipCheck(skcSetup) or GetSkipCheck(skcAll); + SkipAllTests := GetSkipCheck(skcSetup); // check lazarus directory if (not ShowSetupDialog) diff --git a/ide/packages/ideconfig/idecmdline.pas b/ide/packages/ideconfig/idecmdline.pas index 06d6ed9d35..a232b82e69 100644 --- a/ide/packages/ideconfig/idecmdline.pas +++ b/ide/packages/ideconfig/idecmdline.pas @@ -289,10 +289,11 @@ end; function GetSkipCheckByKey(AKey: String): Boolean; var i: integer; - AValue: string; + AAll, AValue: string; begin // return language specified in command line (empty string if no language specified) Result := False; + AAll := ','+UpperCase(SkipChecksKeys[skcAll])+','; AKey := ','+UpperCase(AKey)+','; AValue := ''; i := 1; @@ -301,7 +302,7 @@ begin if ParamIsOptionPlusValue(i, SkipChecksOptLong, AValue) = true then begin AValue := ','+UpperCase(AValue)+','; - Result := Pos(AKey, AValue) > 0; + Result := (Pos(AAll, AValue) > 0) or (Pos(AKey, AValue) > 0); if Result then exit; end; diff --git a/packager/pkgmanager.pas b/packager/pkgmanager.pas index 8e7f49c980..9fc83d3a71 100644 --- a/packager/pkgmanager.pas +++ b/packager/pkgmanager.pas @@ -1538,7 +1538,7 @@ var begin StaticPackages:=LazarusPackageIntf.RegisteredPackages; if StaticPackages=nil then exit; - Quiet:=GetSkipCheck(skcMissingPackageFile) or GetSkipCheck(skcAll); + Quiet:=GetSkipCheck(skcMissingPackageFile); PackageGraph.AbortRegistration:=false; // register components in Lazarus packages for i:=0 to StaticPackages.Count-1 do begin