mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-12 08:48:15 +02:00
fixes for fpc 2.1.1 xmlcfg
git-svn-id: trunk@7510 -
This commit is contained in:
parent
e09bf2f62f
commit
81e58be5bc
@ -5639,8 +5639,9 @@ var
|
|||||||
begin
|
begin
|
||||||
if FileExists(FileName) then DeleteFile(FileName);
|
if FileExists(FileName) then DeleteFile(FileName);
|
||||||
|
|
||||||
Cfg:=TXMLConfig.Create(FileName);
|
Cfg:=TXMLConfig.Create(nil);
|
||||||
Try
|
Try
|
||||||
|
Cfg.FileName := FileName;
|
||||||
SaveContent(Cfg);
|
SaveContent(Cfg);
|
||||||
Finally
|
Finally
|
||||||
Cfg.Flush;
|
Cfg.Flush;
|
||||||
@ -5656,8 +5657,9 @@ begin
|
|||||||
if not FileExists(FileName) then
|
if not FileExists(FileName) then
|
||||||
raise Exception.Create(rsGridFileDoesNotExists);
|
raise Exception.Create(rsGridFileDoesNotExists);
|
||||||
|
|
||||||
Cfg:=TXMLConfig.Create(FileName);
|
Cfg:=TXMLConfig.Create(nil);
|
||||||
Try
|
Try
|
||||||
|
Cfg.Filename := FileName;
|
||||||
Version:=cfg.GetValue('grid/version',-1);
|
Version:=cfg.GetValue('grid/version',-1);
|
||||||
if Version=-1 then raise Exception.Create(rsNotAValidGridFile);
|
if Version=-1 then raise Exception.Create(rsNotAValidGridFile);
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
|
@ -81,8 +81,10 @@ end;
|
|||||||
|
|
||||||
procedure TCustomXMLPropStorage.StorageNeeded(ReadOnly: Boolean);
|
procedure TCustomXMLPropStorage.StorageNeeded(ReadOnly: Boolean);
|
||||||
begin
|
begin
|
||||||
If (FXML=Nil) then
|
If (FXML=Nil) then begin
|
||||||
FXML:=TPropStorageXMLConfig.Create(GetXMLFileName);
|
FXML:=TPropStorageXMLConfig.Create(nil);
|
||||||
|
FXML.FileName := GetXMLFileName;
|
||||||
|
end;
|
||||||
Inc(FCount);
|
Inc(FCount);
|
||||||
//debugln('TCustomXMLPropStorage.StorageNeeded ',dbgsname(FXML),' ',dbgs(FXML),' FCount=',dbgs(FCount));
|
//debugln('TCustomXMLPropStorage.StorageNeeded ',dbgsname(FXML),' ',dbgs(FXML),' FCount=',dbgs(FCount));
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user