Difference between revisions of "Lazarus 2.4.0 release notes"

From Free Pascal wiki
Jump to navigationJump to search
 
(15 intermediate revisions by 5 users not shown)
Line 7: Line 7:
  
 
== LCL Interfaces Changes ==
 
== LCL Interfaces Changes ==
 +
=== Qt5 ===
 +
Qt5 uses native event loop on all platforms.
 +
C bindings are updated.
 +
 +
=== Qt6 ===
 +
Qt6 widgetset implemented. C bindings are based on Qt6 6.2.0 LTS.
  
 
== LCL Changes ==
 
== LCL Changes ==
Line 36: Line 42:
 
*Different calculation of checkbox/radiobutton size in order to correctly take care of Win-10 "ease of access" feature. See {{MantisLink|39398}}
 
*Different calculation of checkbox/radiobutton size in order to correctly take care of Win-10 "ease of access" feature. See {{MantisLink|39398}}
 
*Consequence: lfm files will contain different sizes of these controls (if auto-sized) compared with earlier versions.
 
*Consequence: lfm files will contain different sizes of these controls (if auto-sized) compared with earlier versions.
 +
 +
=== Grids ===
 +
* You can now set the cell editors properties ParentColor and ParentFont by including goEditorParentColor resp. goEditorParentFont in the grid's Options2 property.
 +
 +
=== TShellTreeView ===
 +
* New property <tt>ExpandCollapseMode</tt> defining options whether a collapsing node should clear its child nodes.
 +
* Implements custom sorting of the treeview items by setting <tt>FileSortType</tt> to <tt>fstCustom</tt> and providing a custom compare function in the event <tt>OnSortCompare</tt>.
  
 
== IDE Changes ==
 
== IDE Changes ==
Line 56: Line 69:
 
** Added DisplayFormat
 
** Added DisplayFormat
 
** Added options for Function calling / and "Converter" (See FpDebug: SysVarToLstr)
 
** Added options for Function calling / and "Converter" (See FpDebug: SysVarToLstr)
 +
* Per project "Debugger backend" settings. In addition to choosing a specific backend from the global IDE settings, a backend can be configured just for the project (i.e. special gdb-server settings)
  
==== FpDebug ====
+
==== FpDebug / LazDebuggerFp ====
  
 
* Improved "function calling" in watch eval. See [[FpDebug-Watches-FunctionEval]]
 
* Improved "function calling" in watch eval. See [[FpDebug-Watches-FunctionEval]]
Line 64: Line 78:
 
* Option to detect "variant" and call "SysVarToLStr" in the target app.
 
* Option to detect "variant" and call "SysVarToLStr" in the target app.
 
* Suspend/Resume individual threads (must be done while app is paused, and will be applied for subsequent step/run)
 
* Suspend/Resume individual threads (must be done while app is paused, and will be applied for subsequent step/run)
 +
* Partial improvements to debug in DLL: https://wiki.freepascal.org/Debugger_Status#Other
 +
 +
==== Floating point properties in the Object Inspector ====
 +
* The Object Inspector now explicitely disallows to set a floating point property's value to +/-Inf or NaN.
 +
* Reason: whilst +/-Inf and NaN are valid values for a floating point property, they cannot be streamed (so, the form could not be loaded) and setting it to NaN caused havoc in the IDE.
 +
* Remedy: set the value at runtime (in code)
  
 
== IDE Interface Changes ==
 
== IDE Interface Changes ==
Line 74: Line 94:
 
* New property '''RandomColors''' for TRandomChartSource.
 
* New property '''RandomColors''' for TRandomChartSource.
 
* New properties '''YIndexWhiskerMin''', '''YIndexBarMin''', '''YIndexCenter''', '''YIndexBarMax''', '''YIndexWhiskerMax''', and '''YDataLayout''' in TBoxAndWhiskerSeries for more flexible assignment of y values to the parts of the box/whisher shape.
 
* New properties '''YIndexWhiskerMin''', '''YIndexBarMin''', '''YIndexCenter''', '''YIndexBarMax''', '''YIndexWhiskerMax''', and '''YDataLayout''' in TBoxAndWhiskerSeries for more flexible assignment of y values to the parts of the box/whisher shape.
 +
* New option '''aipInteger''' in the set TAxisIntervalParamOptions which sets axis labels only at integer values and thus supresses the unwanted intermediate labels in bar charts and helps to enforce labels in logarithmic plots at the powers of the logarithmic base (usually 10).
 +
=== TDateTimePicker ===
 +
* New properties MonthDisplay and CustomMonthNames. They are meant to replace the MonthNames property, which has been deprecated.
  
 
=== Pas2js ===
 
=== Pas2js ===
Line 93: Line 116:
  
 
==LCL==
 
==LCL==
 +
===TLabel: autosized and right-aligned===
 +
*Old behaviour: Autosized label with Alignment=taRightJustify but Anchors=[akLeft,...] grew to left.
 +
*New behaviour: The label grows to right now.
 +
*Reason: It wasn't possible to implement the behavior also for hidden labels without significant extensions in the LCL. The LCL has a different and more generic feature of control-based anchoring that delivers the same effect (see Remedy down), so it is not needed and wanted to double this feature and make the LCL code more complex and prone to bugs.
 +
*Remedy: Use the LCL anchoring to a secondary control. Anchor the right side of the label to another control. Then the autosized label will grow to the left but won't move to the right when the parent is resized like it is done with a simple akRight anchor without a reference control.
 +
 
===TDateEdit/TTimeEdit===
 
===TDateEdit/TTimeEdit===
 
The value of NullDate has changed.<br>
 
The value of NullDate has changed.<br>
Line 122: Line 151:
 
===Components incompatibility===
 
===Components incompatibility===
 
====LazControls====
 
====LazControls====
 +
=====TSpinEditExBase derived classes=====
 +
* All derived classes form TSpinEditExBase must implement a SameValue method. This method is defined as an <b>abstract</b> method in TSpinEditExBase. 
 +
* Reason: All derived classes used Math.SameValue. This is wrong for comparing integer types (even if is is safe when comparing relative small values).
 +
* Remedy: unfortunately you'll have to adjust your code.
 
=====TFloatSpinEditEx=====
 
=====TFloatSpinEditEx=====
 
* The property NumbersOnly is no longer published.
 
* The property NumbersOnly is no longer published.

Latest revision as of 16:53, 30 November 2022

Lazarus 2.4.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

LCL Interfaces Changes

Qt5

Qt5 uses native event loop on all platforms. C bindings are updated.

Qt6

Qt6 widgetset implemented. C bindings are based on Qt6 6.2.0 LTS.

LCL Changes

TTaskDialog

  • Old behaviour Win32: A placeholder icon was used for FooterIcon = tdiNone and MainIcon = tdiNone.
  • New behaviour Win32: No icon is used for FooterIcon = tdiNone and MainIcon = tdiNone.
  • Reason: Removing drawing glitch. The text move over to allow more content and better alignment. See Issue #39172

TSpeedButton

  • Old behaviour: Multi-line captions could only be entered by code. And multi-line captions were always left-aligned.
  • New behaviour: Multi-line captions can also be entered in the object inspector. New property Alignment to specify whether the caption should be left-/right-aligned or centered. Default: centered, like in Delphi.
  • Reason: Better usability.

TLabel.Transparent, .Color and .ParentColor changes

  • Old behaviour: Transparent property was bound to Color=clNone
  • New behaviour: Transparent is a standalone property
  • Reason: Delphi compatibility and to fix ParentColor issues.
  • Remedy: If you are setting the Color property, Transparent is not automatically switched from True to False now, you have to do it yourself. This is in compliance with Delphi and also solves problems with Color/ParentColor changes.

TPanel.VerticalAlignment

  • Old behaviour: The panel caption was always centered vertically.
  • New behaviour: The new property VerticalAlignment (taAlignTop, taAlignBottom, taVerticalCenter) allows to place the caption also at the top or bottom of the panel interior.
  • Reason: Delphi compatibility and better usability

TCalendar

  • Properties MinDate and MaxDate are implemented. These limits are only imposed if MaxDate > MinDate. Unfortunately GTK2/3 widgetsets do not support this, so selecting a date outside the MinDate/MaxDate range will still be possible there.

TCheckbox, TRadioButton

  • Different calculation of checkbox/radiobutton size in order to correctly take care of Win-10 "ease of access" feature. See Issue #39398
  • Consequence: lfm files will contain different sizes of these controls (if auto-sized) compared with earlier versions.

Grids

  • You can now set the cell editors properties ParentColor and ParentFont by including goEditorParentColor resp. goEditorParentFont in the grid's Options2 property.

TShellTreeView

  • New property ExpandCollapseMode defining options whether a collapsing node should clear its child nodes.
  • Implements custom sorting of the treeview items by setting FileSortType to fstCustom and providing a custom compare function in the event OnSortCompare.

IDE Changes

Character map

  • Resizable characters to improve readability.

Debugger

  • Improved Watches window
    • Expand/Unfold for classes, records, etc
    • Expand/Unfold with paged browser for arrays
    • Drag and Drop to reorder watches
    • Drag and Drop to create new "top level" watches from nested entries (in expand/unfolded lists)
    • Address column for types with internal pointer (classes, long-string, dyn-array, (real) pointer)
  • Improved Inspect window
    • Fixed: Updating value when context changes
    • Added options for Function calling / and "Converter" (See FpDebug: SysVarToLstr)
  • Improved Evaluate/Modify window
    • New Layout
    • Added DisplayFormat
    • Added options for Function calling / and "Converter" (See FpDebug: SysVarToLstr)
  • Per project "Debugger backend" settings. In addition to choosing a specific backend from the global IDE settings, a backend can be configured just for the project (i.e. special gdb-server settings)

FpDebug / LazDebuggerFp

Floating point properties in the Object Inspector

  • The Object Inspector now explicitely disallows to set a floating point property's value to +/-Inf or NaN.
  • Reason: whilst +/-Inf and NaN are valid values for a floating point property, they cannot be streamed (so, the form could not be loaded) and setting it to NaN caused havoc in the IDE.
  • Remedy: set the value at runtime (in code)

IDE Interface Changes

Components

TAChart

  • The TLegendClickTools now is able to detect clicks on series legend items and reports the clicked series in the new OnSeriesClick event.
  • New TDatapointMarksClickTool which becomes active when the user clicked on the marks of a series.
  • New property TickWidth for the chart axes.
  • New property RandomColors for TRandomChartSource.
  • New properties YIndexWhiskerMin, YIndexBarMin, YIndexCenter, YIndexBarMax, YIndexWhiskerMax, and YDataLayout in TBoxAndWhiskerSeries for more flexible assignment of y values to the parts of the box/whisher shape.
  • New option aipInteger in the set TAxisIntervalParamOptions which sets axis labels only at integer values and thus supresses the unwanted intermediate labels in bar charts and helps to enforce labels in logarithmic plots at the powers of the logarithmic base (usually 10).

TDateTimePicker

  • New properties MonthDisplay and CustomMonthNames. They are meant to replace the MonthNames property, which has been deprecated.

Pas2js

  • lazbuild now can compile pas2js projects by passing the environment variable PAS2JS with the path of the pas2js executable.
  • Project groups with pas2js projects now can compile without being opened.
  • New project type Progressive Web Application
  • New project type Electron Web Application
  • pas2jsdsgn now uses the SimpleWebServerGUI package, replacing its own http server controller.
  • F9, Run now builds, starts a HTTP server and a browser

Lazarus Icon Collection

  • Not a component, but the Lazarus installation now contains a folder with general-purpose icons for usage in toolbars, menus, buttons etc. of any GUI applications (folder images/general_purpose).
  • The images come in various sizes and thus are compatible with the scaled image list of Lazarus v2.0+.
  • Author: Roland Hahn
  • License: Creative Commons CC0 (no restrictions in usage).

Changes affecting compatibility

LCL

TLabel: autosized and right-aligned

  • Old behaviour: Autosized label with Alignment=taRightJustify but Anchors=[akLeft,...] grew to left.
  • New behaviour: The label grows to right now.
  • Reason: It wasn't possible to implement the behavior also for hidden labels without significant extensions in the LCL. The LCL has a different and more generic feature of control-based anchoring that delivers the same effect (see Remedy down), so it is not needed and wanted to double this feature and make the LCL code more complex and prone to bugs.
  • Remedy: Use the LCL anchoring to a secondary control. Anchor the right side of the label to another control. Then the autosized label will grow to the left but won't move to the right when the parent is resized like it is done with a simple akRight anchor without a reference control.

TDateEdit/TTimeEdit

The value of NullDate has changed.
Reason:

  • It was impssible to actually select the date corresponding to NulDate (30 dec 1899 by default) in the control.
  • Remedy (1): if your code depended on NullDate actually being 0.0, you have to adjust your code.
  • Remedy (2): if your code used NullDate for a TTimeEdit, change that to the new constant NullTime instead.
  • Note: NullDate is actually a writeable constant. This was kept for compatibility reasons. It is however a bad idea to change it's value to anything that is an actual date that is withing the range of the control.

LazUtils

Masks unit

The masks unit has been completely rewritten.
Reasons:

  • speed: the old Matches() method had O(n^2) or even O(n^3) characteristics.
  • improved control over how the mask is interpreted.

New types (for parameters) and a dedicated TMaskWindows class have been added.
TMask.MatchesWindowsMask and the old TMaskOptions type have been deprecated and will be removed in the next release.

Ranges and Sets
  • The old masks implementation supported sets, but not ranges. The new implementation supports both sets ([abc]) and ranges ([a-c]). As a consequence a '-' inside such a construct is now interpreted as part of the range definition, not as a literal '-'.
  • Reason: ranges are a good thing to have by default (the old implementation simply lacked this). We decided it's a small price to pay.
  • Remedy: either escape the '-' with EscapeChar (which defaults to '\') or exclude mocRange from the TMaskOpcodes parameter.
Constructors do not fail anymore on an invalid mask
  • When providing an invalid mask to the old T(Windows)Mask(List) constructors an exception was raised.
  • The new constructors do not raise an exception in this case. Instead an exception is raised in when Matches() is called.
  • Reason: it's not very nice to have a constructor fail.

Components incompatibility

LazControls

TSpinEditExBase derived classes
  • All derived classes form TSpinEditExBase must implement a SameValue method. This method is defined as an abstract method in TSpinEditExBase.
  • Reason: All derived classes used Math.SameValue. This is wrong for comparing integer types (even if is is safe when comparing relative small values).
  • Remedy: unfortunately you'll have to adjust your code.
TFloatSpinEditEx
  • The property NumbersOnly is no longer published.
  • Reason: the property makes no sense for this control and only confuses users.
  • Remedy: if you really need NumbersOnly to be True, you must set it in code.

Other release notes