Skip to content

Commit f5c6545

Browse files
committed
[options] bug fixed
1 parent c38f1de commit f5c6545

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Quick.Options.pas

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Author : Kike Pérez
88
Version : 1.0
99
Created : 18/10/2019
10-
Modified : 30/08/2021
10+
Modified : 15/12/2021
1111
1212
This file is part of QuickLib: https://github.com/exilon/QuickLib
1313
@@ -234,14 +234,14 @@ TFileOptionsContainer = class(TOptionsContainer)
234234
procedure CreateFileMonitor;
235235
procedure FileModifiedNotify(MonitorNotify : TMonitorNotify);
236236
procedure SetReloadIfFileChanged(const Value: Boolean);
237-
function GetFileSectionNames(out oSections: TArray<string>): Boolean;
238237
public
239238
constructor Create(aOptionsSerializer : IFileOptionsSerializer; aReloadIfFileChanged : Boolean = False);
240239
destructor Destroy; override;
241240
property FileName : string read fFilename;
242241
property ReloadIfFileChanged : Boolean read fReloadIfFileChanged write SetReloadIfFileChanged;
243242
property OnFileModified : TFileModifiedEvent read fOnFileModified write fOnFileModified;
244243
procedure Save; override;
244+
function GetFileSectionNames(out oSections: TArray<string>): Boolean;
245245
end;
246246

247247
IOptionsBuilder<T : TOptions> = interface
@@ -347,7 +347,7 @@ destructor TOptionsContainer.Destroy;
347347

348348
function TOptionsContainer.GetFileSectionNames(out oSections: TArray<string>): Boolean;
349349
begin
350-
350+
Result := fSerializer.GetFileSectionNames(oSections);
351351
end;
352352

353353
function TOptionsContainer.GetOptions(aIndex: Integer): TOptions;
@@ -420,9 +420,9 @@ procedure TOptionsContainer.Load(aFailOnSectionNotExists : Boolean = False);
420420
end
421421
else
422422
begin
423-
//if not exists file get default values
423+
//if config not exists get default values
424424
for option in fSections do option.DefaultValues;
425-
//creates default file
425+
//saves default
426426
Save;
427427
end;
428428
end;

0 commit comments

Comments
 (0)