mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 02:59:19 +02:00
Fix more uninitialized variables and suppress compiler warnings. Merge r55222 #4bd30e3b00 manually.
git-svn-id: branches/fixes_1_8@55388 -
This commit is contained in:
parent
65e23c9ff6
commit
5882ca86d7
@ -683,11 +683,12 @@ var
|
|||||||
|
|
||||||
function NeighbourPosition(c: TControl): Integer;
|
function NeighbourPosition(c: TControl): Integer;
|
||||||
begin
|
begin
|
||||||
|
result:=0;
|
||||||
case CurNeighbour of
|
case CurNeighbour of
|
||||||
akTop: result:=c.top;
|
akTop: result:=c.top;
|
||||||
akLeft: result:=c.Left;
|
akLeft: result:=c.Left;
|
||||||
akRight: result:=c.left+c.Width;
|
akRight: result:=c.left+c.Width;
|
||||||
akBottom: result:=c.Top+c.Height;
|
akBottom: result:=c.Top+c.Height;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -994,6 +995,7 @@ end;
|
|||||||
|
|
||||||
function TAnchorDesigner.AnchorDesignerNeighbourText(direction: TAnchorKind): string;
|
function TAnchorDesigner.AnchorDesignerNeighbourText(direction: TAnchorKind): string;
|
||||||
begin
|
begin
|
||||||
|
result:='';
|
||||||
case direction of
|
case direction of
|
||||||
akLeft: result:=lisSelectedLeftNeighbour;
|
akLeft: result:=lisSelectedLeftNeighbour;
|
||||||
akRight: result:=lisSelectedRightNeighbour;
|
akRight: result:=lisSelectedRightNeighbour;
|
||||||
|
@ -463,7 +463,8 @@ end;
|
|||||||
|
|
||||||
function KindToPropertyName(aKind: TSCKind): string;
|
function KindToPropertyName(aKind: TSCKind): string;
|
||||||
begin
|
begin
|
||||||
case aKind of
|
Result:='';
|
||||||
|
case aKind of
|
||||||
scUnknown: Result:='<unknown property>';
|
scUnknown: Result:='<unknown property>';
|
||||||
scActionAccel, scMenuItemAccel, scOtherCompAccel:
|
scActionAccel, scMenuItemAccel, scOtherCompAccel:
|
||||||
Result:='Caption';
|
Result:='Caption';
|
||||||
|
@ -174,6 +174,7 @@ const
|
|||||||
|
|
||||||
function IdeBuildModeToStr(BuildMode: TIdeBuildMode): string;
|
function IdeBuildModeToStr(BuildMode: TIdeBuildMode): string;
|
||||||
begin
|
begin
|
||||||
|
Result:='';
|
||||||
case BuildMode of
|
case BuildMode of
|
||||||
bmBuild: Result:='Build';
|
bmBuild: Result:='Build';
|
||||||
bmCleanBuild: Result:='Clean + Build';
|
bmCleanBuild: Result:='Clean + Build';
|
||||||
|
@ -2027,6 +2027,7 @@ end;
|
|||||||
|
|
||||||
function TBaseCompilerOptions.GetTargetFileExt: string;
|
function TBaseCompilerOptions.GetTargetFileExt: string;
|
||||||
begin
|
begin
|
||||||
|
Result:='';
|
||||||
case ExecutableType of
|
case ExecutableType of
|
||||||
cetProgram:
|
cetProgram:
|
||||||
Result:=GetExecutableExt(fTargetOS);
|
Result:=GetExecutableExt(fTargetOS);
|
||||||
|
@ -5082,6 +5082,7 @@ end;
|
|||||||
|
|
||||||
function TEditorOptions.GetTrimSpaceName(IndentType: TSynEditStringTrimmingType): string;
|
function TEditorOptions.GetTrimSpaceName(IndentType: TSynEditStringTrimmingType): string;
|
||||||
begin
|
begin
|
||||||
|
Result := '';
|
||||||
case IndentType of
|
case IndentType of
|
||||||
settLeaveLine:
|
settLeaveLine:
|
||||||
Result := 'LeaveLine';
|
Result := 'LeaveLine';
|
||||||
|
@ -78,6 +78,7 @@ implementation
|
|||||||
|
|
||||||
function EncloseSelectionTypeDescription(TheType: TEncloseSelectionType): string;
|
function EncloseSelectionTypeDescription(TheType: TEncloseSelectionType): string;
|
||||||
begin
|
begin
|
||||||
|
Result:='';
|
||||||
case TheType of
|
case TheType of
|
||||||
estTryFinally: Result:='Try..Finally';
|
estTryFinally: Result:='Try..Finally';
|
||||||
estTryExcept: Result:='Try..Except';
|
estTryExcept: Result:='Try..Except';
|
||||||
|
@ -402,8 +402,8 @@ var
|
|||||||
LinkTitle: string;
|
LinkTitle: string;
|
||||||
LinkSrc: String;
|
LinkSrc: String;
|
||||||
begin
|
begin
|
||||||
if (ShowFPDocLinkEditorDialog(fSourceFilename,DocFile,Link,LinkTitle)<>mrOk)
|
if ShowFPDocLinkEditorDialog(fSourceFilename,DocFile,Link,LinkTitle)<>mrOk then exit;
|
||||||
or (Link='') then exit;
|
if Link='' then exit;
|
||||||
LinkSrc:='<link id="'+Link+'"';
|
LinkSrc:='<link id="'+Link+'"';
|
||||||
if LinkTitle='' then begin
|
if LinkTitle='' then begin
|
||||||
LinkSrc:=LinkSrc+'/>';
|
LinkSrc:=LinkSrc+'/>';
|
||||||
|
@ -335,6 +335,7 @@ begin
|
|||||||
if Files<>nil then begin
|
if Files<>nil then begin
|
||||||
PPUCount:=0;
|
PPUCount:=0;
|
||||||
SrcCount:=0;
|
SrcCount:=0;
|
||||||
|
FileNode:=nil;
|
||||||
for i:=0 to Files.Count-1 do begin
|
for i:=0 to Files.Count-1 do begin
|
||||||
aFile:=Files[i];
|
aFile:=Files[i];
|
||||||
if CompareFileExt(aFile.Filename,'.ppu',false)=0 then
|
if CompareFileExt(aFile.Filename,'.ppu',false)=0 then
|
||||||
|
@ -9346,6 +9346,7 @@ begin
|
|||||||
if OldSource<>NewSource then
|
if OldSource<>NewSource then
|
||||||
begin
|
begin
|
||||||
Line:=0;
|
Line:=0;
|
||||||
|
Col:=0;
|
||||||
for i:=1 to length(OldSource) do
|
for i:=1 to length(OldSource) do
|
||||||
if (i>length(NewSource)) or (OldSource[i]<>NewSource[i]) then
|
if (i>length(NewSource)) or (OldSource[i]<>NewSource[i]) then
|
||||||
begin
|
begin
|
||||||
@ -12794,8 +12795,9 @@ var
|
|||||||
Root: TPersistent;
|
Root: TPersistent;
|
||||||
JITMethod: TJITMethod;
|
JITMethod: TJITMethod;
|
||||||
begin
|
begin
|
||||||
|
Result:=false;
|
||||||
Root:=GlobalDesignHook.LookupRoot;
|
Root:=GlobalDesignHook.LookupRoot;
|
||||||
if Root=nil then exit(false);
|
if Root=nil then exit;
|
||||||
if TObject(Method.Data)=Root then begin
|
if TObject(Method.Data)=Root then begin
|
||||||
Result:=(Method.Code<>nil) and (Root.MethodName(Method.Code)<>'')
|
Result:=(Method.Code<>nil) and (Root.MethodName(Method.Code)<>'')
|
||||||
and (Root.ClassParent.MethodName(Method.Code)='');
|
and (Root.ClassParent.MethodName(Method.Code)='');
|
||||||
|
@ -3636,6 +3636,7 @@ begin
|
|||||||
piUnit: DlgCaption := dlgMainViewUnits;
|
piUnit: DlgCaption := dlgMainViewUnits;
|
||||||
piComponent: DlgCaption := dlgMainViewForms;
|
piComponent: DlgCaption := dlgMainViewForms;
|
||||||
piFrame: DlgCaption := dlgMainViewFrames;
|
piFrame: DlgCaption := dlgMainViewFrames;
|
||||||
|
else DlgCaption := '';
|
||||||
end;
|
end;
|
||||||
Result := ShowViewUnitsDlg(ItemList, MultiSelect, MultiSelectCheckedState, DlgCaption, ItemType);
|
Result := ShowViewUnitsDlg(ItemList, MultiSelect, MultiSelectCheckedState, DlgCaption, ItemType);
|
||||||
end;
|
end;
|
||||||
@ -6830,7 +6831,9 @@ begin
|
|||||||
// try loading the ancestor first (unit, lfm and component instance)
|
// try loading the ancestor first (unit, lfm and component instance)
|
||||||
|
|
||||||
if AnUnitInfo.UnitResourceFileformat<>nil then
|
if AnUnitInfo.UnitResourceFileformat<>nil then
|
||||||
DefAncestorClass:=AnUnitInfo.UnitResourceFileformat.DefaultComponentClass;
|
DefAncestorClass:=AnUnitInfo.UnitResourceFileformat.DefaultComponentClass
|
||||||
|
else
|
||||||
|
DefAncestorClass:=nil;
|
||||||
// use TForm as default ancestor
|
// use TForm as default ancestor
|
||||||
if DefAncestorClass=nil then
|
if DefAncestorClass=nil then
|
||||||
DefAncestorClass:=BaseFormEditor1.StandardDesignerBaseClasses[DesignerBaseClassId_TForm];
|
DefAncestorClass:=BaseFormEditor1.StandardDesignerBaseClasses[DesignerBaseClassId_TForm];
|
||||||
@ -6838,8 +6841,7 @@ begin
|
|||||||
if (AncestorClass=nil) then begin
|
if (AncestorClass=nil) then begin
|
||||||
IgnoreBtnText:='';
|
IgnoreBtnText:='';
|
||||||
if DefAncestorClass<>nil then
|
if DefAncestorClass<>nil then
|
||||||
IgnoreBtnText:=Format(lisIgnoreUseAsAncestor, [DefAncestorClass.ClassName]
|
IgnoreBtnText:=Format(lisIgnoreUseAsAncestor, [DefAncestorClass.ClassName]);
|
||||||
);
|
|
||||||
|
|
||||||
Result:=LoadComponentDependencyHidden(AnUnitInfo,AncestorClassName,
|
Result:=LoadComponentDependencyHidden(AnUnitInfo,AncestorClassName,
|
||||||
OpenFlags,false,AncestorClass,AncestorUnitInfo,GrandAncestorClass,
|
OpenFlags,false,AncestorClass,AncestorUnitInfo,GrandAncestorClass,
|
||||||
|
@ -593,7 +593,7 @@ begin
|
|||||||
else
|
else
|
||||||
QtFont.setFamily(UTF16ToUTF8(GetDefaultAppFontName));
|
QtFont.setFamily(UTF16ToUTF8(GetDefaultAppFontName));
|
||||||
|
|
||||||
if (LogFont.lfQuality >= Low(QStyleStategy)) and (LogFont.lfQuality <= High(QStyleStategy)) then
|
if LogFont.lfQuality <= High(QStyleStategy) then
|
||||||
QtFont.setStyleStrategy(QStyleStategy[LogFont.lfQuality]);
|
QtFont.setStyleStrategy(QStyleStategy[LogFont.lfQuality]);
|
||||||
Result := HFONT(QtFont);
|
Result := HFONT(QtFont);
|
||||||
except
|
except
|
||||||
@ -6144,6 +6144,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if fnMapMode <> TQtDeviceContext(DC).vMapMode then
|
if fnMapMode <> TQtDeviceContext(DC).vMapMode then
|
||||||
begin
|
begin
|
||||||
|
AWindowExt := Point(0, 0);
|
||||||
case fnMapMode of
|
case fnMapMode of
|
||||||
MM_ANISOTROPIC:; // user's choice
|
MM_ANISOTROPIC:; // user's choice
|
||||||
MM_ISOTROPIC:; // adjusted after each SetViewPortExtEx call (see MSDN for details)
|
MM_ISOTROPIC:; // adjusted after each SetViewPortExtEx call (see MSDN for details)
|
||||||
|
@ -1440,6 +1440,7 @@ class function TQtWSCustomComboBox.GetMaxLength(
|
|||||||
var
|
var
|
||||||
LineEdit: TQtLineEdit;
|
LineEdit: TQtLineEdit;
|
||||||
begin
|
begin
|
||||||
|
Result := 0;
|
||||||
if not WSCheckHandleAllocated(ACustomComboBox, 'GetMaxLength') then
|
if not WSCheckHandleAllocated(ACustomComboBox, 'GetMaxLength') then
|
||||||
Exit;
|
Exit;
|
||||||
LineEdit := TQtComboBox(ACustomComboBox.Handle).LineEdit;
|
LineEdit := TQtComboBox(ACustomComboBox.Handle).LineEdit;
|
||||||
@ -1448,9 +1449,7 @@ begin
|
|||||||
Result := LineEdit.getMaxLength;
|
Result := LineEdit.getMaxLength;
|
||||||
if Result = QtMaxEditLength then
|
if Result = QtMaxEditLength then
|
||||||
Result := 0;
|
Result := 0;
|
||||||
end
|
end;
|
||||||
else
|
|
||||||
Result := 0;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
@ -588,7 +588,7 @@ begin
|
|||||||
else
|
else
|
||||||
QtFont.setFamily(UTF16ToUTF8(GetDefaultAppFontName));
|
QtFont.setFamily(UTF16ToUTF8(GetDefaultAppFontName));
|
||||||
|
|
||||||
if (LogFont.lfQuality >= Low(QStyleStategy)) and (LogFont.lfQuality <= High(QStyleStategy)) then
|
if LogFont.lfQuality <= High(QStyleStategy) then
|
||||||
QtFont.setStyleStrategy(QStyleStategy[LogFont.lfQuality]);
|
QtFont.setStyleStrategy(QStyleStategy[LogFont.lfQuality]);
|
||||||
Result := HFONT(QtFont);
|
Result := HFONT(QtFont);
|
||||||
except
|
except
|
||||||
@ -6014,6 +6014,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if fnMapMode <> TQtDeviceContext(DC).vMapMode then
|
if fnMapMode <> TQtDeviceContext(DC).vMapMode then
|
||||||
begin
|
begin
|
||||||
|
AWindowExt := Point(0, 0);
|
||||||
case fnMapMode of
|
case fnMapMode of
|
||||||
MM_ANISOTROPIC:; // user's choice
|
MM_ANISOTROPIC:; // user's choice
|
||||||
MM_ISOTROPIC:; // adjusted after each SetViewPortExtEx call (see MSDN for details)
|
MM_ISOTROPIC:; // adjusted after each SetViewPortExtEx call (see MSDN for details)
|
||||||
|
@ -1419,6 +1419,7 @@ class function TQtWSCustomComboBox.GetMaxLength(
|
|||||||
var
|
var
|
||||||
LineEdit: TQtLineEdit;
|
LineEdit: TQtLineEdit;
|
||||||
begin
|
begin
|
||||||
|
Result := 0;
|
||||||
if not WSCheckHandleAllocated(ACustomComboBox, 'GetMaxLength') then
|
if not WSCheckHandleAllocated(ACustomComboBox, 'GetMaxLength') then
|
||||||
Exit;
|
Exit;
|
||||||
LineEdit := TQtComboBox(ACustomComboBox.Handle).LineEdit;
|
LineEdit := TQtComboBox(ACustomComboBox.Handle).LineEdit;
|
||||||
@ -1427,9 +1428,7 @@ begin
|
|||||||
Result := LineEdit.getMaxLength;
|
Result := LineEdit.getMaxLength;
|
||||||
if Result = QtMaxEditLength then
|
if Result = QtMaxEditLength then
|
||||||
Result := 0;
|
Result := 0;
|
||||||
end
|
end;
|
||||||
else
|
|
||||||
Result := 0;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user