diff --git a/components/fppkg/src/fppkg_mainfrm.pas b/components/fppkg/src/fppkg_mainfrm.pas index 1bf944fb89..eed1e9dff2 100644 --- a/components/fppkg/src/fppkg_mainfrm.pas +++ b/components/fppkg/src/fppkg_mainfrm.pas @@ -158,10 +158,17 @@ begin exit; Prefix:=''; case Level of + {$IF FPC_FULLVERSION > 20602} + llWarning : + Prefix:=SWarning; + llError : + Prefix:=SError; + {$ELSE} vlWarning : Prefix:=SWarning; vlError : Prefix:=SError; + {$ENDIF} { vlInfo : Prefix:='I: '; vlCommands : @@ -574,7 +581,7 @@ begin CompilerOptions.UpdateLocalRepositoryOption; if FileExists(S) then begin - pkgglobals.Log(vlDebug, SLogLoadingCompilerConfig, [S]); + pkgglobals.Log({$IF FPC_FULLVERSION > 20602}llDebug{$ELSE}vlDebug{$ENDIF}, SLogLoadingCompilerConfig, [S]); CompilerOptions.LoadCompilerFromFile(S); end else @@ -582,7 +589,7 @@ begin // Generate a default configuration if it doesn't exists if GlobalOptions.CompilerConfig = 'default' then begin - pkgglobals.Log(vlDebug, SLogGeneratingCompilerConfig, [S]); + pkgglobals.Log({$IF FPC_FULLVERSION > 20602}llDebug{$ELSE}vlDebug{$ENDIF}, SLogGeneratingCompilerConfig, [S]); CompilerOptions.InitCompilerDefaults; CompilerOptions.SaveCompilerToFile(S); if CompilerOptions.SaveInifileChanges then @@ -592,13 +599,13 @@ begin Error(SErrMissingCompilerConfig, [S]); end; // Log compiler configuration - CompilerOptions.LogValues(vlDebug, ''); + CompilerOptions.LogValues({$IF FPC_FULLVERSION > 20602}llDebug{$ELSE}vlDebug{$ENDIF}, ''); // Load FPMake compiler config, this is normally the same config as above S := GlobalOptions.CompilerConfigDir + GlobalOptions.FPMakeCompilerConfig; FPMakeCompilerOptions.UpdateLocalRepositoryOption; if FileExists(S) then begin - pkgglobals.Log(vlDebug, SLogLoadingFPMakeCompilerConfig, [S]); + pkgglobals.Log({$IF FPC_FULLVERSION > 20602}llDebug{$ELSE}vlDebug{$ENDIF}, SLogLoadingFPMakeCompilerConfig, [S]); FPMakeCompilerOptions.LoadCompilerFromFile(S); if FPMakeCompilerOptions.SaveInifileChanges then FPMakeCompilerOptions.SaveCompilerToFile(S); @@ -606,7 +613,7 @@ begin else Error(SErrMissingCompilerConfig, [S]); // Log compiler configuration - FPMakeCompilerOptions.LogValues(vlDebug, 'fpmake-building '); + FPMakeCompilerOptions.LogValues({$IF FPC_FULLVERSION > 20602}llDebug{$ELSE}vlDebug{$ENDIF}, 'fpmake-building '); end; procedure TFppkgForm.DoRun(cfg: TFppkgConfigOptions; ParaAction: string; @@ -660,7 +667,7 @@ begin laz_pkghandler.Laz_ExecuteAction('', 'laz_update'); except on E: Exception do - pkgglobals.Log(vlWarning, E.Message); + pkgglobals.Log({$IF FPC_FULLVERSION > 20602}llWarning{$ELSE}vlWarning{$ENDIF}, E.Message); end; end; LoadLocalAvailableRepository; @@ -677,7 +684,7 @@ begin (ParaAction = 'laz_compile') or (ParaAction = 'laz_build') or (ParaAction = 'laz_install') or (ParaAction = 'laz_archive')) then begin - pkgglobals.Log(vlDebug, SLogCheckBrokenDependenvies); + pkgglobals.Log({$IF FPC_FULLVERSION > 20602}llDebug{$ELSE}vlDebug{$ENDIF}, SLogCheckBrokenDependenvies); SL := TStringList.Create; if FindBrokenPackages(SL) then Error(SErrBrokenPackagesFound); @@ -703,7 +710,7 @@ begin end else begin - pkgglobals.Log(vlDebug, SLogCommandLineAction,['[' + ParaPackages[i] + ']', ParaAction]); + pkgglobals.Log({$IF FPC_FULLVERSION > 20602}llDebug{$ELSE}vlDebug{$ENDIF}, SLogCommandLineAction,['[' + ParaPackages[i] + ']', ParaAction]); laz_pkghandler.Laz_ExecuteAction(ParaPackages[i], ParaAction); end; end; diff --git a/components/fppkg/src/fppkg_optionsfrm.pas b/components/fppkg/src/fppkg_optionsfrm.pas index f6bc689bc7..8c7495c2e0 100644 --- a/components/fppkg/src/fppkg_optionsfrm.pas +++ b/components/fppkg/src/fppkg_optionsfrm.pas @@ -279,12 +279,21 @@ begin //setup verbosity with VerbosityCheckGroup do begin + {$IF FPC_FULLVERSION > 20602} + Checked[Items.IndexOf('Error')] := llError in LazPkgOptions.Verbosity; + Checked[Items.IndexOf('Warning')] := llWarning in LazPkgOptions.Verbosity; + Checked[Items.IndexOf('Info')] := llInfo in LazPkgOptions.Verbosity; + Checked[Items.IndexOf('Commands')] := llCommands in LazPkgOptions.Verbosity; + Checked[Items.IndexOf('Debug')] := llDebug in LazPkgOptions.Verbosity; + Checked[Items.IndexOf('Progress')] := llProgres in LazPkgOptions.Verbosity; + {$ELSE} Checked[Items.IndexOf('Error')] := vlError in LazPkgOptions.Verbosity; Checked[Items.IndexOf('Warning')] := vlWarning in LazPkgOptions.Verbosity; Checked[Items.IndexOf('Info')] := vlInfo in LazPkgOptions.Verbosity; Checked[Items.IndexOf('Commands')] := vlCommands in LazPkgOptions.Verbosity; Checked[Items.IndexOf('Debug')] := vlDebug in LazPkgOptions.Verbosity; Checked[Items.IndexOf('Progress')] := vlProgres in LazPkgOptions.Verbosity; + {$ENDIF} end; end; @@ -296,6 +305,20 @@ begin LazPkgOptions.Verbosity := []; with VerbosityCheckGroup do begin + {$IF FPC_FULLVERSION > 20602} + if Checked[Items.IndexOf('Error')] then + LazPkgOptions.Verbosity := LazPkgOptions.Verbosity + [llError]; + if Checked[Items.IndexOf('Warning')] then + LazPkgOptions.Verbosity := LazPkgOptions.Verbosity + [llWarning]; + if Checked[Items.IndexOf('Info')] then + LazPkgOptions.Verbosity := LazPkgOptions.Verbosity + [llInfo]; + if Checked[Items.IndexOf('Commands')] then + LazPkgOptions.Verbosity := LazPkgOptions.Verbosity + [llCommands]; + if Checked[Items.IndexOf('Debug')] then + LazPkgOptions.Verbosity := LazPkgOptions.Verbosity + [llDebug]; + if Checked[Items.IndexOf('Progress')] then + LazPkgOptions.Verbosity := LazPkgOptions.Verbosity + [llProgres]; + {$ELSE} if Checked[Items.IndexOf('Error')] then LazPkgOptions.Verbosity := LazPkgOptions.Verbosity + [vlError]; if Checked[Items.IndexOf('Warning')] then @@ -308,6 +331,7 @@ begin LazPkgOptions.Verbosity := LazPkgOptions.Verbosity + [vlDebug]; if Checked[Items.IndexOf('Progress')] then LazPkgOptions.Verbosity := LazPkgOptions.Verbosity + [vlProgres]; + {$ENDIF} end; Close; diff --git a/components/fppkg/src/laz_pkghandler.pas b/components/fppkg/src/laz_pkghandler.pas index f01afd5ed5..607a9baff6 100644 --- a/components/fppkg/src/laz_pkghandler.pas +++ b/components/fppkg/src/laz_pkghandler.pas @@ -19,9 +19,15 @@ begin pkghandlerclass:=GetPkgHandler(AAction); With pkghandlerclass.Create(nil,APackageName) do try + {$IF FPC_FULLVERSION > 20602} + Log(llDebug,SLogRunAction+' start',[AAction]); + Execute; + Log(llDebug,SLogRunAction+' end',[AAction]); + {$ELSE} Log(vlDebug,SLogRunAction+' start',[AAction]); Execute; Log(vlDebug,SLogRunAction+' end',[AAction]); + {$ENDIF} finally Free; end; diff --git a/components/fppkg/src/laz_pkgrepos.pas b/components/fppkg/src/laz_pkgrepos.pas index cc7d6fa6d9..6a7a421164 100644 --- a/components/fppkg/src/laz_pkgrepos.pas +++ b/components/fppkg/src/laz_pkgrepos.pas @@ -6,7 +6,7 @@ interface uses SysUtils, Classes, ComCtrls, - fprepos; + fprepos{$IF FPC_FULLVERSION > 20602}, fpmkunit{$ENDIF}; type diff --git a/components/synedit/syneditmarkuphighall.pp b/components/synedit/syneditmarkuphighall.pp index 13e5f05b78..c7fcc796a0 100644 --- a/components/synedit/syneditmarkuphighall.pp +++ b/components/synedit/syneditmarkuphighall.pp @@ -2264,7 +2264,7 @@ begin if (OldEndPoint.y >= 0) and not IsPosValid(OldEndPoint) then OldEndPoint := Point(1, FFirstInvalidLine - AdjustedSearchStrMaxLines); if (OldEndPoint.y < 0) and (FMatches.Count > 0) then - OldEndPoint := FMatches.EndPoint[FMatches.Count]; + OldEndPoint := FMatches.EndPoint[FMatches.Count-1]; if (OldEndPoint.y <= OldStartPoint.y) or (OldEndPoint.y < 0) or (OldStartPoint.y < 0) or diff --git a/debugger/gdbmidebugger.pp b/debugger/gdbmidebugger.pp index c6754833e8..f096eb81de 100644 --- a/debugger/gdbmidebugger.pp +++ b/debugger/gdbmidebugger.pp @@ -5055,6 +5055,8 @@ begin end; SetTargetInfo(FileType); + DefaultTimeOut := DebuggerProperties.TimeoutForEval; // Getting address for breakpoints may need timeout + DetectForceableBreaks; (* We need a breakpoint at entry-point or main, to continue initialization @@ -5087,6 +5089,7 @@ begin DebugLn(DBG_VERBOSE, '[Debugger] Target PID: %u', [TargetInfo^.TargetPID]); // they may still exist from prev run, addr will be checked + // TODO: defered setting of below beakpoint / e.g. if debugging a library FTheDebugger.FExceptionBreak.SetByAddr(Self); FTheDebugger.FBreakErrorBreak.SetByAddr(Self); FTheDebugger.FRunErrorBreak.SetByAddr(Self); @@ -5209,7 +5212,7 @@ begin // Get PID NewPID := 0; - s := GetPart(['Attaching to process '], [LineEnding], CmdResp, True, False); + s := GetPart(['Attaching to process '], [LineEnding, '.'], CmdResp, True, False); if s <> '' then NewPID := StrToIntDef(s, 0); @@ -8303,7 +8306,9 @@ begin env := EnvironmentAsStringList; DebuggerEnvironment := env; env.Free; +{$ifNdef MSWindows} DebuggerEnvironment.Values['LANG'] := 'C'; // try to prevent GDB from using localized messages +{$ENDIF} if CreateDebugProcess(Options) then begin diff --git a/debugger/gdbtypeinfo.pp b/debugger/gdbtypeinfo.pp index d8a39d2be2..1b8758e424 100644 --- a/debugger/gdbtypeinfo.pp +++ b/debugger/gdbtypeinfo.pp @@ -340,7 +340,7 @@ type gptrEvalExpr2, gptrEvalExprDeRef2, gptrEvalExprCast2, // used by MaybeString gptrPtypeCustomAutoCast, gptrPtypeCustomAutoCast2, gptrInstanceClassName, - gptrPtypeCustomEval + gptrEvalCustomEval ); TGDBTypeProcessRequests = set of TGDBTypeProcessRequest; @@ -2073,7 +2073,7 @@ function TGDBType.RequireRequests(ARequired: TGDBTypeProcessRequests; ACustomDat gptrPtypeCustomAutoCast, gptrPtypeCustomAutoCast2: Result := GdbCmdPType + ACustomData; gptrInstanceClassName: Result := GdbCmdEvaluate+Quote('(^^^char('+FExpression+')^+3)^'); - gptrPtypeCustomEval: Result := GdbCmdEvaluate+Quote(ACustomData); + gptrEvalCustomEval: Result := GdbCmdEvaluate+Quote(ACustomData); end; end; @@ -2096,7 +2096,7 @@ begin for i := low(TGDBTypeProcessRequest) to high(TGDBTypeProcessRequest) do if i in NeededReq then begin AddTypeReq(FReqResults[i], GetReqText(i)); - if i in [gptrEvalExpr, gptrEvalExprDeRef, gptrEvalExprCast, gptrInstanceClassName] + if i in [gptrEvalExpr, gptrEvalExprDeRef, gptrEvalExprCast, gptrInstanceClassName, gptrEvalCustomEval] then FReqResults[i].ReqType := gcrtEvalExpr else FReqResults[i].ReqType := gcrtPType; end; @@ -2762,10 +2762,10 @@ var exit; end; - if not RequireRequests([gptrPtypeCustomEval], '^^longint('+FExpression+')[-1]') then exit; - if not IsReqError(gptrPtypeCustomEval, False) then begin + if not RequireRequests([gptrEvalCustomEval], '^^longint('+FExpression+')[-1]') then exit; + if not IsReqError(gptrEvalCustomEval, False) then begin FBoundLow := 0; - FBoundHigh := StrToIntDef(GetParsedFromResult(FReqResults[gptrPtypeCustomEval].Result.GdbDescription, 'value'), -1); + FBoundHigh := StrToIntDef(GetParsedFromResult(FReqResults[gptrEvalCustomEval].Result.GdbDescription, 'value'), -1); FLen := FBoundHigh + 1; end; diff --git a/debugger/watchpropertydlg.lfm b/debugger/watchpropertydlg.lfm index 2e6d14bb89..0ba174f35c 100644 --- a/debugger/watchpropertydlg.lfm +++ b/debugger/watchpropertydlg.lfm @@ -17,9 +17,9 @@ object WatchPropertyDlg: TWatchPropertyDlg AnchorSideTop.Control = txtExpression AnchorSideTop.Side = asrCenter Left = 6 - Height = 16 - Top = 9 - Width = 59 + Height = 15 + Top = 10 + Width = 58 BorderSpacing.Left = 6 Caption = 'Expression:' ParentColor = False @@ -28,9 +28,9 @@ object WatchPropertyDlg: TWatchPropertyDlg AnchorSideTop.Control = txtRepCount AnchorSideTop.Side = asrCenter Left = 6 - Height = 16 - Top = 38 - Width = 76 + Height = 15 + Top = 39 + Width = 75 BorderSpacing.Left = 6 Caption = 'Repeat Count:' ParentColor = False @@ -40,10 +40,10 @@ object WatchPropertyDlg: TWatchPropertyDlg AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = txtDigits AnchorSideTop.Side = asrCenter - Left = 160 - Height = 16 - Top = 38 - Width = 34 + Left = 159 + Height = 15 + Top = 39 + Width = 33 BorderSpacing.Left = 12 Caption = 'Digits:' ParentColor = False @@ -52,10 +52,10 @@ object WatchPropertyDlg: TWatchPropertyDlg AnchorSideLeft.Control = lblExpression AnchorSideLeft.Side = asrBottom AnchorSideRight.Side = asrBottom - Left = 71 + Left = 70 Height = 23 Top = 6 - Width = 343 + Width = 344 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 BorderSpacing.Top = 6 @@ -67,7 +67,7 @@ object WatchPropertyDlg: TWatchPropertyDlg AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = txtExpression AnchorSideTop.Side = asrBottom - Left = 88 + Left = 87 Height = 23 Top = 35 Width = 60 @@ -81,13 +81,13 @@ object WatchPropertyDlg: TWatchPropertyDlg AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = txtRepCount AnchorSideTop.Side = asrCenter - Left = 200 + Left = 198 Height = 23 Top = 35 Width = 60 BorderSpacing.Left = 6 BorderSpacing.Top = 6 - TabOrder = 4 + TabOrder = 3 Text = '0' end object chkEnabled: TCheckBox @@ -101,7 +101,7 @@ object WatchPropertyDlg: TWatchPropertyDlg BorderSpacing.Left = 6 BorderSpacing.Top = 6 Caption = 'Enabled' - TabOrder = 5 + TabOrder = 4 end object chkAllowFunc: TCheckBox AnchorSideLeft.Control = chkEnabled @@ -156,7 +156,7 @@ object WatchPropertyDlg: TWatchPropertyDlg 'Default' 'Memory Dump' ) - TabOrder = 3 + TabOrder = 6 end object ButtonPanel: TButtonPanel AnchorSideTop.Control = rgStyle @@ -177,7 +177,7 @@ object WatchPropertyDlg: TWatchPropertyDlg CloseButton.Enabled = False CancelButton.Name = 'CancelButton' CancelButton.DefaultCaption = True - TabOrder = 6 + TabOrder = 7 ShowButtons = [pbOK, pbCancel, pbHelp] ShowBevel = False end @@ -192,6 +192,6 @@ object WatchPropertyDlg: TWatchPropertyDlg Width = 129 BorderSpacing.Left = 6 Caption = 'chkUseInstanceClass' - TabOrder = 7 + TabOrder = 5 end end diff --git a/lcl/include/application.inc b/lcl/include/application.inc index 9f2609bb02..68d8482112 100644 --- a/lcl/include/application.inc +++ b/lcl/include/application.inc @@ -838,11 +838,15 @@ begin end; // make the hint have the same BiDiMode as the activating control - //FHintWindow.BiDiMode := FHintControl.BiDiMode; + FHintWindow.BiDiMode := FHintControl.BiDiMode; // calculate the width of the hint based on HintStr and MaxWidth with HintInfo do HintWinRect := FHintWindow.CalcHintRect(HintMaxWidth, HintStr, HintData); - OffsetRect(HintWinRect, HintInfo.HintPos.X, HintInfo.HintPos.Y); + //Position HintWindow depending on LTR/RTL + if FHintWindow.UseRightToLeftAlignment then + OffsetRect(HintWinRect, HintInfo.HintPos.X - (HintWinRect.Right - HintWinRect.Left), HintInfo.HintPos.Y) + else + OffsetRect(HintWinRect, HintInfo.HintPos.X, HintInfo.HintPos.Y); //DebugLn(['TApplication.ShowHintWindow HintStr="',HintInfo.HintStr,'" HintWinRect=',dbgs(HintWinRect)]); {if FHintWindow.UseRightToLeftAlignment then with HintWinRect do diff --git a/lcl/include/hintwindow.inc b/lcl/include/hintwindow.inc index 8eb4e03bfa..fb29a6cb5c 100644 --- a/lcl/include/hintwindow.inc +++ b/lcl/include/hintwindow.inc @@ -244,6 +244,8 @@ end; function THintWindow.CalcHintRect(MaxWidth: Integer; const AHint: String; AData: Pointer): TRect; +var + Flags: Cardinal; begin if AHint = '' then begin @@ -253,12 +255,14 @@ begin if MaxWidth <= 0 then MaxWidth := Screen.Width - 4 * HintBorderWidth; Result := Rect(0, 0, MaxWidth, Screen.Height - 4 * HintBorderWidth); + Flags := DT_CALCRECT or DT_NOPREFIX or DT_WORDBREAK; + if UseRightToLeftAlignment then Flags := Flags or DT_RTLREADING; if UseThemes then Result := ThemeServices.GetTextExtent(Canvas.GetUpdatedHandle([csFontValid]), - ThemeServices.GetElementDetails(tttStandardNormal), AHint, DT_NOPREFIX or DT_WORDBREAK, @Result) + ThemeServices.GetElementDetails(tttStandardNormal), AHint, Flags, @Result) else DrawText(Canvas.GetUpdatedHandle([csFontValid]), PChar(AHint), Length(AHint), - Result, DT_CALCRECT or DT_NOPREFIX or DT_WORDBREAK); + Result, Flags); inc(Result.Right, 4 * HintBorderWidth); inc(Result.Bottom, 4 * HintBorderWidth); //debugln('THintWindow.CalcHintRect Result=',dbgs(Result));