mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 18:29:09 +02:00
* fix: Return Default value by TRegIniFile.ReadXXX methods if requested registry value does not exist.
git-svn-id: trunk@7242 -
This commit is contained in:
parent
73f3b5163a
commit
7f6dec9db4
@ -104,7 +104,8 @@ begin
|
|||||||
Result := Default;
|
Result := Default;
|
||||||
if not OpenKey(fPath+Section,false) then Exit;
|
if not OpenKey(fPath+Section,false) then Exit;
|
||||||
try
|
try
|
||||||
Result := inherited ReadBool(Ident);
|
if ValueExists(Ident) then
|
||||||
|
Result := inherited ReadBool(Ident);
|
||||||
finally
|
finally
|
||||||
CloseKey;
|
CloseKey;
|
||||||
end;
|
end;
|
||||||
@ -115,7 +116,8 @@ begin
|
|||||||
Result := Default;
|
Result := Default;
|
||||||
if not OpenKey(fPath+Section,false) then Exit;
|
if not OpenKey(fPath+Section,false) then Exit;
|
||||||
try
|
try
|
||||||
Result := inherited ReadInteger(Ident);
|
if ValueExists(Ident) then
|
||||||
|
Result := inherited ReadInteger(Ident);
|
||||||
finally
|
finally
|
||||||
CloseKey;
|
CloseKey;
|
||||||
end;
|
end;
|
||||||
@ -126,7 +128,8 @@ begin
|
|||||||
Result := Default;
|
Result := Default;
|
||||||
if not OpenKey(fPath+Section,false) then Exit;
|
if not OpenKey(fPath+Section,false) then Exit;
|
||||||
try
|
try
|
||||||
Result := inherited ReadString(Ident);
|
if ValueExists(Ident) then
|
||||||
|
Result := inherited ReadString(Ident);
|
||||||
finally
|
finally
|
||||||
CloseKey;
|
CloseKey;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user