mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 21:38:00 +02:00
Jedi code format: remove code that does nothing since OLD_REG_ROOT_KEY is equal to REG_ROOT_KEY
This commit is contained in:
parent
fb861fa2a1
commit
6fb4b3e49b
@ -58,8 +58,7 @@ type
|
||||
TShowParseTreeOption = (eShowAlways, eShowOnError, eShowNever);
|
||||
|
||||
const
|
||||
OLD_REG_ROOT_KEY = '\Software\Jedi\JediCodeFormat';
|
||||
REG_ROOT_KEY = OLD_REG_ROOT_KEY;
|
||||
REG_ROOT_KEY = '\Software\Jedi\JediCodeFormat';
|
||||
|
||||
const
|
||||
SOURCE_FILE_FILTERS =
|
||||
|
@ -237,45 +237,8 @@ begin
|
||||
end;
|
||||
|
||||
constructor TJCFRegistrySettings.Create;
|
||||
var
|
||||
Registry: TRegistry;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
// Move old registry content to new registry location if applicable
|
||||
Registry := TRegistry.Create;
|
||||
try
|
||||
Registry.Access := KEY_ALL_ACCESS;
|
||||
Registry.RootKey := HKEY_CURRENT_USER;
|
||||
if not (Registry.OpenKey(REG_ROOT_KEY, False)) then
|
||||
begin
|
||||
if (Registry.OpenKey(OLD_REG_ROOT_KEY, False)) then
|
||||
begin
|
||||
Registry.MoveKey(OLD_REG_ROOT_KEY, REG_ROOT_KEY, True);
|
||||
Registry.CloseKey;
|
||||
if (Registry.OpenKey('\Software\Jedi', False)) then
|
||||
begin
|
||||
if not Registry.HasSubKeys then
|
||||
begin
|
||||
Registry.CloseKey;
|
||||
if (Registry.OpenKey('\Software', False)) then
|
||||
begin
|
||||
Registry.DeleteKey('Jedi');
|
||||
Registry.CloseKey;
|
||||
end;
|
||||
end
|
||||
else
|
||||
Registry.CloseKey;
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
Registry.CloseKey;
|
||||
finally
|
||||
Registry.Free;
|
||||
end;
|
||||
|
||||
// New registry location
|
||||
fcReg := TRegIniFile.Create(REG_ROOT_KEY);
|
||||
|
||||
fcExclusionsFiles := TStringList.Create; // Will compare with CompareText.
|
||||
|
Loading…
Reference in New Issue
Block a user