Skip to content

Commit da13d98

Browse files
committed
fit/adjustments-for-previous-versions-of-delphi
1 parent 8e8a121 commit da13d98

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

Src/DefaultsQuestions/DelphiAIDev.DefaultsQuestions.Model.pas

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ procedure TDelphiAIDevDefaultsQuestionsModel.SaveData(const AFields: TDelphiAIDe
122122
LJSONObject.AddPair('code_only', TJSONBool.Create(AFields.CodeOnly));
123123
LJSONArray.AddElement(LJSONObject);
124124

125-
LStringList.Text := LJSONArray.Format(2);
125+
{$IF CompilerVersion <= 32.0} //Tokyo
126+
LStringList.Text := LJSONArray.ToJSON;
127+
{$ELSE}
128+
LStringList.Text := LJSONArray.Format(2);
129+
{$ENDIF}
126130
finally
127131
LJSONArray.Free;
128132
end;
@@ -183,7 +187,11 @@ procedure TDelphiAIDevDefaultsQuestionsModel.EditData(const AFields: TDelphiAIDe
183187
end;
184188
end;
185189

186-
LStringList.Text := LJSONArray.Format(2);
190+
{$IF CompilerVersion <= 32.0} //Tokyo
191+
LStringList.Text := LJSONArray.ToJSON;
192+
{$ELSE}
193+
LStringList.Text := LJSONArray.Format(2);
194+
{$ENDIF}
187195
finally
188196
LJSONArray.Free;
189197
end;
@@ -228,7 +236,11 @@ procedure TDelphiAIDevDefaultsQuestionsModel.RemoveData(const AGuid: string);
228236
end;
229237
end;
230238

231-
LStringList.Text := LJSONArray.Format(2);
239+
{$IF CompilerVersion <= 32.0} //Tokyo
240+
LStringList.Text := LJSONArray.ToJSON;
241+
{$ELSE}
242+
LStringList.Text := LJSONArray.Format(2);
243+
{$ENDIF}
232244
finally
233245
LJSONArray.Free;
234246
end;

Src/Utils/DelphiAIDev.Utils.OTA.pas

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ class function TUtilsOTA.CheckIfExistFileInCurrentsProjectGroups(const ANameFile
424424
end;
425425

426426
class procedure TUtilsOTA.IDEThemingAll(AFormClass: TCustomFormClass; AForm: TForm);
427-
{$IF CompilerVersion >= 32.0}
427+
{$IF CompilerVersion >= 32.0} //Tokyo
428428
var
429429
i: Integer;
430430
LIOTAIDEThemingServices250: IOTAIDEThemingServices250;
@@ -467,7 +467,7 @@ class function TUtilsOTA.ActiveThemeIsDark: Boolean;
467467
const
468468
THEME_DARK = 'dark';
469469
begin
470-
{$IF CompilerVersion >= 32.0}
470+
{$IF CompilerVersion >= 32.0} //Tokyo
471471
Result := Self.GetIOTAIDEThemingServices.ActiveTheme.ToLower.Equals(THEME_DARK);
472472
{$ELSE}
473473
Result := False;
@@ -496,8 +496,7 @@ class function TUtilsOTA.GetIOTAFormEditor(const AIOTAModule: IOTAModule): IOTAF
496496
end;
497497
end;
498498

499-
{$IF CompilerVersion >= 32.0}
500-
499+
{$IF CompilerVersion >= 32.0} //Tokyo
501500
class function TUtilsOTA.GetIOTAIDEThemingServices: IOTAIDEThemingServices;
502501
begin
503502
if(not Supports(BorlandIDEServices, IOTAIDEThemingServices, Result))then
@@ -511,7 +510,6 @@ class function TUtilsOTA.GetIOTAIDEThemingServices250: IOTAIDEThemingServices250
511510
end;
512511
{$ENDIF}
513512

514-
515513
class function TUtilsOTA.GetIOTACompileServices: IOTACompileServices;
516514
begin
517515
if(not Supports(BorlandIDEServices, IOTACompileServices, Result))then

0 commit comments

Comments
 (0)