mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 21:38:00 +02:00
ide: compiler options frames - support TBaseCompilerOptions instead of TProjectCompilerOptions
git-svn-id: trunk@23340 -
This commit is contained in:
parent
658f3137f0
commit
8cfb4412a9
@ -197,7 +197,7 @@ procedure TCompilerCodegenOptionsFrame.ReadSettings(AOptions: TAbstractIDEOption
|
||||
var
|
||||
i: longint;
|
||||
begin
|
||||
with AOptions as TProjectCompilerOptions do
|
||||
with AOptions as TBaseCompilerOptions do
|
||||
begin
|
||||
chkSmartLinkUnit.Checked := SmartLinkUnit;
|
||||
|
||||
@ -243,7 +243,7 @@ var
|
||||
NewTargetOS: string;
|
||||
NewTargetCPU: string;
|
||||
begin
|
||||
with AOptions as TProjectCompilerOptions do
|
||||
with AOptions as TBaseCompilerOptions do
|
||||
begin
|
||||
SmartLinkUnit := chkSmartLinkUnit.Checked;
|
||||
|
||||
@ -289,7 +289,7 @@ end;
|
||||
|
||||
class function TCompilerCodegenOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result := TProjectCompilerOptions;
|
||||
Result := TBaseCompilerOptions;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
@ -77,7 +77,7 @@ end;
|
||||
|
||||
procedure TCompilerLinkingOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
begin
|
||||
with AOptions as TProjectCompilerOptions do
|
||||
with AOptions as TBaseCompilerOptions do
|
||||
begin
|
||||
chkDebugGDB.Checked := GenerateDebugInfo;
|
||||
chkUseLineInfoUnit.Checked := UseLineInfoUnit;
|
||||
@ -102,7 +102,7 @@ end;
|
||||
|
||||
procedure TCompilerLinkingOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||
begin
|
||||
with AOptions as TProjectCompilerOptions do
|
||||
with AOptions as TBaseCompilerOptions do
|
||||
begin
|
||||
GenerateDebugInfo := chkDebugGDB.Checked;
|
||||
UseLineInfoUnit := chkUseLineInfoUnit.Checked;
|
||||
@ -122,7 +122,7 @@ end;
|
||||
|
||||
class function TCompilerLinkingOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result := TProjectCompilerOptions;
|
||||
Result := TBaseCompilerOptions;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
@ -150,7 +150,7 @@ procedure TCompilerMessagesOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptio
|
||||
begin
|
||||
chkUseMsgFile.OnChange := nil;
|
||||
try
|
||||
with AOptions as TProjectCompilerOptions do
|
||||
with AOptions as TBaseCompilerOptions do
|
||||
begin
|
||||
chkUseMsgFile.Checked := UseMsgFile;
|
||||
editMsgFileName.Caption := MsgFileName;
|
||||
@ -164,7 +164,7 @@ end;
|
||||
|
||||
procedure TCompilerMessagesOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||
begin
|
||||
with AOptions as TProjectCompilerOptions do
|
||||
with AOptions as TBaseCompilerOptions do
|
||||
begin
|
||||
UseMsgFile := chkUseMsgFile.Checked;
|
||||
MsgFileName := editMsgFileName.Caption;
|
||||
@ -174,7 +174,7 @@ end;
|
||||
|
||||
class function TCompilerMessagesOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result := TProjectCompilerOptions;
|
||||
Result := TBaseCompilerOptions;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
@ -34,6 +34,7 @@ inherited CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'chkCustomConfigFile'
|
||||
OnClick = chkCustomConfigFileClick
|
||||
TabOrder = 1
|
||||
end
|
||||
object edtConfigPath: TEdit
|
||||
|
@ -11,13 +11,13 @@ LazarusResources.Add('TCompilerOtherOptionsFrame','FORMDATA',[
|
||||
+'Spacing.Around'#2#6#7'Caption'#6#13'chkConfigFile'#8'TabOrder'#2#0#0#0#9'TC'
|
||||
+'heckBox'#19'chkCustomConfigFile'#4'Left'#2#6#6'Height'#2#17#3'Top'#2#29#5'W'
|
||||
+'idth'#3#25#2#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6
|
||||
+#19'chkCustomConfigFile'#8'TabOrder'#2#1#0#0#5'TEdit'#13'edtConfigPath'#4'Le'
|
||||
+'ft'#2#6#6'Height'#2#21#3'Top'#2'4'#5'Width'#3#25#2#5'Align'#7#5'alTop'#20'B'
|
||||
+'orderSpacing.Around'#2#6#8'TabOrder'#2#2#4'Text'#6#13'edtConfigPath'#0#0#0
|
||||
+#242#2#1#9'TGroupBox'#16'grpCustomOptions'#4'Left'#2#0#6'Height'#3#127#1#3'T'
|
||||
+'op'#2'g'#5'Width'#3')'#2#5'Align'#7#8'alClient'#17'BorderSpacing.Top'#2#6#7
|
||||
+'Caption'#6#16'grpCustomOptions'#12'ClientHeight'#3'm'#1#11'ClientWidth'#3'%'
|
||||
+#2#8'TabOrder'#2#1#0#5'TMemo'#16'memCustomOptions'#4'Left'#2#6#6'Height'#3'a'
|
||||
+#1#3'Top'#2#6#5'Width'#3#25#2#5'Align'#7#8'alClient'#20'BorderSpacing.Around'
|
||||
+#2#6#8'TabOrder'#2#0#0#0#0#0
|
||||
+#19'chkCustomConfigFile'#7'OnClick'#7#24'chkCustomConfigFileClick'#8'TabOrde'
|
||||
+'r'#2#1#0#0#5'TEdit'#13'edtConfigPath'#4'Left'#2#6#6'Height'#2#21#3'Top'#2'4'
|
||||
+#5'Width'#3#25#2#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#8'TabOrder'
|
||||
+#2#2#4'Text'#6#13'edtConfigPath'#0#0#0#242#2#1#9'TGroupBox'#16'grpCustomOpti'
|
||||
+'ons'#4'Left'#2#0#6'Height'#3#127#1#3'Top'#2'g'#5'Width'#3')'#2#5'Align'#7#8
|
||||
+'alClient'#17'BorderSpacing.Top'#2#6#7'Caption'#6#16'grpCustomOptions'#12'Cl'
|
||||
+'ientHeight'#3'm'#1#11'ClientWidth'#3'%'#2#8'TabOrder'#2#1#0#5'TMemo'#16'mem'
|
||||
+'CustomOptions'#4'Left'#2#6#6'Height'#3'a'#1#3'Top'#2#6#5'Width'#3#25#2#5'Al'
|
||||
+'ign'#7#8'alClient'#20'BorderSpacing.Around'#2#6#8'TabOrder'#2#0#0#0#0#0
|
||||
]);
|
||||
|
@ -19,8 +19,9 @@ type
|
||||
grpConfigFile: TGroupBox;
|
||||
grpCustomOptions: TGroupBox;
|
||||
memCustomOptions: TMemo;
|
||||
procedure chkCustomConfigFileClick(Sender: TObject);
|
||||
private
|
||||
FOptions: TProjectCompilerOptions;
|
||||
FOptions: TBaseCompilerOptions;
|
||||
public
|
||||
function Check: Boolean; override;
|
||||
function GetTitle: string; override;
|
||||
@ -34,6 +35,11 @@ implementation
|
||||
|
||||
{ TCompilerOtherOptionsFrame }
|
||||
|
||||
procedure TCompilerOtherOptionsFrame.chkCustomConfigFileClick(Sender: TObject);
|
||||
begin
|
||||
edtConfigPath.Enabled := chkCustomConfigFile.Checked;
|
||||
end;
|
||||
|
||||
function TCompilerOtherOptionsFrame.Check: Boolean;
|
||||
var
|
||||
NewDontUseConfigFile: Boolean;
|
||||
@ -86,7 +92,7 @@ end;
|
||||
|
||||
procedure TCompilerOtherOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
begin
|
||||
FOptions := AOptions as TProjectCompilerOptions;
|
||||
FOptions := AOptions as TBaseCompilerOptions;
|
||||
with FOptions do
|
||||
begin
|
||||
chkConfigFile.Checked := not DontUseConfigFile;
|
||||
@ -99,7 +105,7 @@ end;
|
||||
|
||||
procedure TCompilerOtherOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||
begin
|
||||
with AOptions as TProjectCompilerOptions do
|
||||
with AOptions as TBaseCompilerOptions do
|
||||
begin
|
||||
DontUseConfigFile := not chkConfigFile.Checked;
|
||||
CustomConfigFile := chkCustomConfigFile.Checked;
|
||||
@ -110,7 +116,7 @@ end;
|
||||
|
||||
class function TCompilerOtherOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result := TProjectCompilerOptions;
|
||||
Result := TBaseCompilerOptions;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
@ -113,7 +113,7 @@ end;
|
||||
|
||||
procedure TCompilerParsingOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
begin
|
||||
with AOptions as TProjectCompilerOptions do
|
||||
with AOptions as TBaseCompilerOptions do
|
||||
begin
|
||||
if (AssemblerStyle in [1,2,3]) then
|
||||
grpAsmStyle.ItemIndex := AssemblerStyle
|
||||
@ -138,7 +138,7 @@ end;
|
||||
|
||||
procedure TCompilerParsingOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||
begin
|
||||
with AOptions as TProjectCompilerOptions do
|
||||
with AOptions as TBaseCompilerOptions do
|
||||
begin
|
||||
AssemblerStyle := grpAsmStyle.ItemIndex;
|
||||
|
||||
@ -160,7 +160,7 @@ end;
|
||||
|
||||
class function TCompilerParsingOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result := TProjectCompilerOptions;
|
||||
Result := TBaseCompilerOptions;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
@ -30,7 +30,7 @@ type
|
||||
LCLWidgetTypeComboBox: TComboBox;
|
||||
LCLWidgetTypeLabel: TLabel;
|
||||
private
|
||||
FCompilerOpts: TProjectCompilerOptions;
|
||||
FCompilerOpts: TBaseCompilerOptions;
|
||||
OtherUnitsPathEditBtn: TPathEditorButton;
|
||||
IncludeFilesPathEditBtn: TPathEditorButton;
|
||||
OtherSourcesPathEditBtn: TPathEditorButton;
|
||||
@ -462,7 +462,7 @@ procedure TCompilerPathOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
var
|
||||
LCLPlatform: TLCLPlatform;
|
||||
begin
|
||||
FCompilerOpts := AOptions as TProjectCompilerOptions;
|
||||
FCompilerOpts := AOptions as TBaseCompilerOptions;
|
||||
with FCompilerOpts do
|
||||
begin
|
||||
edtOtherUnits.Text := OtherUnitFiles;
|
||||
@ -484,7 +484,7 @@ procedure TCompilerPathOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions)
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
with AOptions as TProjectCompilerOptions do
|
||||
with AOptions as TBaseCompilerOptions do
|
||||
begin
|
||||
OtherUnitFiles := edtOtherUnits.Text;
|
||||
IncludePath := edtIncludeFiles.Text;
|
||||
@ -503,7 +503,7 @@ end;
|
||||
|
||||
class function TCompilerPathOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result := TProjectCompilerOptions;
|
||||
Result := TBaseCompilerOptions;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
@ -69,7 +69,7 @@ end;
|
||||
|
||||
procedure TCompilerVerbosityOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
begin
|
||||
with AOptions as TProjectCompilerOptions, grpVerbosity do
|
||||
with AOptions as TBaseCompilerOptions, grpVerbosity do
|
||||
begin
|
||||
Checked[0] := ShowErrors;
|
||||
Checked[1] := ShowHintsForSenderNotUsed;
|
||||
@ -98,7 +98,7 @@ end;
|
||||
|
||||
procedure TCompilerVerbosityOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||
begin
|
||||
with AOptions as TProjectCompilerOptions, grpVerbosity do
|
||||
with AOptions as TBaseCompilerOptions, grpVerbosity do
|
||||
begin
|
||||
ShowErrors := Checked[0];
|
||||
ShowHintsForSenderNotUsed := Checked[1];
|
||||
@ -124,10 +124,9 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TCompilerVerbosityOptionsFrame.SupportedOptionsClass:
|
||||
TAbstractIDEOptionsClass;
|
||||
class function TCompilerVerbosityOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result := TProjectCompilerOptions;
|
||||
Result := TBaseCompilerOptions;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
Loading…
Reference in New Issue
Block a user