Difference between revisions of "Lazarus 2.2.0 release notes"

From Lazarus wiki
Jump to navigationJump to search
(→‎TAChart: TPieSeries.AngleRange)
(→‎LCL incompatibilities: TCanvas.PolyBezier)
Line 126: Line 126:
 
* New behavior: these characters now are mask characters for hexadecimal and binary input respectively.
 
* New behavior: these characters now are mask characters for hexadecimal and binary input respectively.
 
* Reason: nice to have feature (QT5 supports it natively).
 
* Reason: nice to have feature (QT5 supports it natively).
* Remedy: if you need one of these characters as a literal in your EditMask: escape them with a '\'.  
+
* Remedy: if you need one of these characters as a literal in your EditMask: escape them with a '\'.
 +
 
 +
=== TCanvas.PolyBezier default behavior ===
 +
The default value of the Continuous parameter was changed because it breaks Delphi compatibility.
 +
* Old behavior: There are several overloads and optional parameters of the canvas' <tt>PolyBezier</tt> method. In the Delphi-compatible call having only the points array as a parameter, the <tt>Continuous</tt> argument has the default value <tt>false</tt>.
 +
* New behavior: The argument <tt>Continuous</tt> has the value <tt>true</tt> now.
 +
* Reason: The Delphi <tt>PolyBezier</tt> behavior is different from the Lazarus behaviour with the same call parameters; it draws the Bezier curve like Lazarus using <tt>Continuous = true</tt>.
 +
* Remedy: To obtain the old behavior expand the parameter list by the <tt>Continuous</tt> parameter set to <tt>false</tt>.
  
 
==Components incompatibilities==
 
==Components incompatibilities==

Revision as of 00:15, 16 December 2019

Lazarus 2.2.0 is not yet released. This page is under construction!

Statistics:

  1. commits: xxx
  2. log: svn log -r xxxx:xxxx
  3. resolved bug tracker issues: xxx

LazUtils Changes

FileExistsUTF8 uses SysUtils.FileExists

  • Old behavior: FileExistsUTF8 supported Unicode in fpc 2.6.x under Windows
  • New behavior: FileExistsUTF8 now calls SysUtils.FileExists, which supports Unicode under Windows since fpc 3.0
  • Reason: Simplified

LCL Interfaces Changes

  • Qt5 widgetset needs libQt5Pas v 1.2.7 since result of QWidget_winId() is changed from PtrInt to PtrUInt.
 Windows Qt5Pas1.dll is already in lazarus trunk binaries directory.
 Linux distributions should rebuild libQt5Pas packages.
 MacOS you should rebuild libQt5Pas against downloaded Qt5Pas libs (Qt5-5.6 is minimum).

LCL Changes

TLazIntfImage.Create with size and description flags need no CreateData anymore

  • Old: After creating of a TLazIntfImage with size and flags CreateData has to be called
  • New: Creating of a TLazIntfImage with size and flags internal calls CreateData
  • Reason: Simplify, see Issue #35035

TShellTreeView

  • New event OnAddItem gives possibility for finer control over what to add to the tree.

TShellListView

  • New event OnAddItem gives possibility for finer control over what to add to the listview.
  • New property MaskCaseSensitivity to allow e.g. case-insensitive masks on *nix. The property defaults to platfom standard behaviour.


IDE Changes

  • Added IDE macro $(OutputFile) for the outputfile of the project. This usually corresponds to $(TargetFile), except when having a host application, in which case $(TargetFile) is the host application, while $(OutputFile) is the project executable (or library).
  • Codetools support for anonymous functions
  • "Close tabs to the right" in Source-Notebook
  • Editor
    • Added commands (key-shortcut) for
      • Swap line/selection up/down (selection is extended to full lines, and also always includes line with caret)
      • Duplicate line/selection(selection is extended to full lines, and also always includes line with caret)
      • Copy/Cut append to clipboard (with space separator, unless already present
      • Copy/Cut (append) line/selection to clipboard (selection is extended to full lines, and also always includes line with caret)
    • Option to prevent Select-All/Paragraph/ToBrace from scrolling
  • Extension of master PO files (a.k.a. templates) is changed from .po to .pot.
    • Example for IDE translation:
Previously we had:
Template: lazaruside.po
German: lazaruside.de.po
Russian: lazaruside.ru.po
Spanish: lazaruside.es.po
Now we have (note extension of the template):
Template: lazaruside.pot
German: lazaruside.de.po
Russian: lazaruside.ru.po
Spanish: lazaruside.es.po
  • Reasons:
    • .pot is 'industry standard' extension for PO template files. As a consequence, PO editors can now open our templates 'out of the box' and automate creation of translations.
    • It is much simpler to detect template files now that dotted unit names are allowed.
  • Remedy: You can safely remove .po template files from your project after you rebuild your project with the new IDE (at this point .pot files should be generated).
  • Debugger
    • GDB(mi) Debugger: Stepping from exception to finally/except now works under Win64 SEH. (Requires updated GDB)
    • GDB(mi) Debugger: Updated GDB for Win64 to 8.2
    • Debugger Config: The IDE now provides the ability to set up different debugger-configs as named profiles.
    • LazDebugger-FP (FpDebug) v0.9 is now part of BigIDE, and can be used as alternative backend on Windows and Linux
  • Project Groups:
    • Option frame under Tools / Options
    • Load last open project group on start (option to disable)
    • More / Undo menu item to undo a delete
    • More / Info menu item to show some stats. At the moment it shows all source directories.
    • Find in Files has a new option "Search in project group".
    • Option to redirect the IDE command Compile/Build project to Compile/Build the selected target in the project group editor. For example Ctrl-F9 can compile the whole project group.

IDE Interface Changes

Components

AnchorDocking

  • New button to minimize a docked site.

Spotter

  • New IDE addon, showing a search list of all IDE commands.

TAChart

  • New chart tools "TAxisClickTool", "TTitleFootClickTool" and "TLegendClickTool": Create OnClick events when the user clicks on a chart axis or its title, the chart title or footer, or the chart legend, respectively. Good for creating an interactive GUI for formatting charts.
  • New property "AllowPanning" to turn built-in panning on/off.
  • New property "LimitToExtent" for zooming tools, avoids zooming out of the chart's full extent.
  • Property editor for TSeriesPointerStyle.
  • TBarSeries:
    • New property "BarShape" for drawing alternative shapes (cylinder, hexagonal prism, pyramid or cone) instead of rectangular bar.
  • TPieSeries:
    • Impoved painting of 3D pie series due to new properties: "DepthBrightnessDelta" allowing to darken or brighten the sides of the pie slices, "Orientation" and "ViewAngle" for different views of the series
    • New property "InnerRadiusPercent" allowing to draw a chart (donut).
    • New property "MarkPositionCentered" for attaching data point labels to the pie center instead of the pie perimeter.
    • New property "StartAngle" to define the position of the first pie slice.
    • New property "AngleRange" to define tha total angular range between first and last slice.
  • TListChartSource can be sorted by X, Y, XList, YList, Color, Text, or in a user-specific way defined by the event OnCompare.
  • New TSortedChartSource which, if inserted between original chart source and series, allows sorting of TUserDefinedChartSource or TCalculatedChartSource by the same criteria as TListChartSource.
  • New property "AdjustSides" of TChartExtentLink allowing to automatically align the sides of aligned charts to each other (in case of differently sized axis labels).

Changes affecting compatibility

LazUtils

  • Trailing lineendings are not forcibly added to multiline strings in PO files anymore. Now multiline strings in PO files match exactly corresponding resource strings.
  • Reasons:
    • PO format does not prohibit multiline strings without trailing lineendings (and e.g. recent versions of Poedit do not complain about them).
    • New behavior unbreaks loading multiline translations from MO files.
  • Note that all multiline strings with mismatching trailing lineendings will be marked as fuzzy during translation update.

LCL incompatibilities

TMaskEdit: hexadecimal and binary characters

Mask support for hexadecimal and binary characters was added (this is a Lazarus extension, Delphi does not support this).

  • Old behavior: the characters 'h', 'H', 'b' and 'B' had no special meaning in the EditMask property
  • New behavior: these characters now are mask characters for hexadecimal and binary input respectively.
  • Reason: nice to have feature (QT5 supports it natively).
  • Remedy: if you need one of these characters as a literal in your EditMask: escape them with a '\'.

TCanvas.PolyBezier default behavior

The default value of the Continuous parameter was changed because it breaks Delphi compatibility.

  • Old behavior: There are several overloads and optional parameters of the canvas' PolyBezier method. In the Delphi-compatible call having only the points array as a parameter, the Continuous argument has the default value false.
  • New behavior: The argument Continuous has the value true now.
  • Reason: The Delphi PolyBezier behavior is different from the Lazarus behaviour with the same call parameters; it draws the Bezier curve like Lazarus using Continuous = true.
  • Remedy: To obtain the old behavior expand the parameter list by the Continuous parameter set to false.

Components incompatibilities

TAChart: Chart.AllowZoom changed

The property AllowZoom of TChart is meant to give the user the chance to turn the builtin zooming feature on or off.

  • Old behavior: AllowZoom operates also on an external toolset.
  • New behavior: AllowZoom is effective only for the built-in toolset.
  • Reason: More consistent handling of properties
  • Remedy: Use the property Enabled of the external zoom tool to switch zooming off, or don't add a zoom tool at all.

TAChart: DataPointDrawTool.OnDraw event deprecated

The event OnDraw of the data point draw tools (TDataPointCrosshairTool, TDataPointDistanceTool) will be removed and replaced by the new event OnCustomDraw.

  • Old behavior: OnDraw uses the chart's Drawer for painting the crosshair or distance bars.
  • New behavior: the Drawer to be used is passed as a parameter.
  • Reason: When a chart is painted to an external file the chart's Drawer still refers to the screen; therefore, the datapoint cross hair or distance bars are missing in the external file.
  • Remedy: Copy the old OnDraw event handler code to the new OnCustomDraw handler, but replace "Chart.Drawer" by the "ADrawer" given as a event parameter.

TAChart: TChartAxis.OnMarkToText event deprecated

The event OnMarkToText of the chart's axes will be removed and replaced by the new event OnGetMarkText.

  • Old behavior: The old OnMarkToText event does not have a Sender parameter.
  • New behavior: The new OnGetMarkText event has the affected axis as Sender parameter.
  • Reason: When dealing with multiple charts and/or multiple axes, it is currently required to create an individual handler for each axis because it is not possible to determine the axis for which to create axis marks for. This is not required any more with the new event.
  • Remedy: Copy the old OnMarkToText handler code to the new OnGetMarkText handler.

TAChart: OpenGL-related units moved to separate packge TAChartOpenGL

  • Old behavior: OpenGL-related units had been available in the main TAChartLazarusPackage directly. The drawer unit TADrawerOpenGL was not added to the uses list automatically and required a special treatment (see old OpenGL demo project).
  • New behavior: OpenGL-related units are now contained in the new package TAChartOpenGL.
  • Reason: Compilation issues when the system did not contain OpenGL libraries.
  • Remedy: Add package TAChartOpenGL to the requirements of the project. Only needed when project uses the OpenGL drawer.

VirtualTreeViews: Renamed to "laz." prefix

VirtualTreeViews is essentially needed by OnlinePackageManager. Having this original package within the Lazarus installation makes is impossible for users to install a different version of this package.

  • Old behavior: Projects with VirtualTreeViews required the "virtualtreeview_package" and had the unit "virtualtrees" in the uses clause. The registered component classes were named "TVirtualStringTree", "TVirtualDrawTree", "TVTHeaderPopup".
  • New behavior: The package was renamed to "laz.virtualtreeview_package". All file names were changed to have a "laz." prefix, i.e. the uses clause will have to contain "laz.virtualtrees". The registered components are named "TLazVirtualStringTree", "TLazVirtualDrawTree", and "TLazVTHeaderPopup".
  • Reason: Avoid naming conflicts when another version of VirtualTreeViews is installed
  • Remedy: For existing projects requiring the VirtualTreeViews distributed with Lazarus,
    • open the lfm file in an external editor and replace "TVirtualStringTree" by "TLazVirtualStringTree", as well as - if available - "TVirtualDrawTree" by "TLazVirtualDrawTree" and "TVTHeaderPopup" by "TLazVTHeaderPopup".
    • open the project in the IDE, remove package "VirtualTreeView_package" from the project requirements and replace it by "laz.virtualtreeview_package"
    • in the pas file's "uses" clause, replace "virtualtrees" by "laz.virtualtrees"
    • in the pas file replace "TVirtualStringTree" by "TLazVirtualStringTree" (and accordingly for the other VTV components).

IDE incompatibilities

LPI&LPS project files: XML structure changed

  • Old behavior: Child elements had an index suffix.
  • New behavior: Child elements have no suffix.
  • Problems: New LPI files cannot be opened in legacy Lazarus installations.
  • Reason: VCS like the new structure better.
  • Remedy: Save your LPI files in compatibility mode. (Project options -> Miscellaneous -> Maximize compatibility of project files)

LPK package files: XML structure changed

  • Old behavior: Child elements had an index suffix.
  • New behavior: Child elements have no suffix.
  • Problems: New LPK files cannot be opened in legacy Lazarus installations.
  • Reason: VCS like the new structure better.
  • Remedy: Save your LPK files in compatibility mode. (Package options -> Usage -> Maximize compatibility of package file)

Packages incompatibilities

ProjectGroups: LPG XML structure changed

  • Old behavior: The <Mode?> elements were not placed within the <BuildModes> element. Child elements had an index suffix.
  • New behavior: Child elements have no suffix.
  • Problems: New LPG files cannot be opened in legacy Lazarus installations.
  • Reason: VCS like the new structure better.
  • Remedy: There is no.

Previous release notes