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