* [Core] Add Boolean Functions to expressions (AND, OR, BOOL, NOT)
* [Core] Add `if` function to expressions to overcome ternary operator limitations
* [Core] Update expressions grammar to recognize relational operations as arguments
* [Core] The `if` function has been removed as no consensus was reached regarding its convenience or necessity. Its inclusion was considered potentially confusing or redundant.
* [Core] Make boolean cast based on Confusion threshold.
Quantity is often queried for Unit just to see if it has a dimension.
Ask Quantity directly using isDimensionless() method and modify that
method not to care about Quantity value validity; no user was ever
asking for value validity.
Rename files according 7d233dc ("Gui: Rename generated lexer files
to match core naming pattern"). Note that C space errors (space
before tabs, spaces on blank lines, etc.) still need to be fixed
manually after regenerating lexer file.
- The location of the documentation is improved (not in the cpp file
anymore but in core-app.dox). This prevents cluttering source with
high-level overviews typical of topic documentation.
- The formatting has been made consistent.
* Prevent naming properties with reserved words (Fix#16846)
* Prevent using reserved constant names for properties or aliases
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* App: Add unit test for isTokenAConstant
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
Adds a few new Expression functions with the goal to:
- Simplify Placement, Rotation, Vector and Matrix object creation.
- Add new matrix functions for rotation and translation.
This adds a function cbrt(arg) to the freecad-expressions that computes
the cube root of arg. Instead of arg^(1/3) this handles the units of the
argument, so that one can compute units from p.e. ml to mm.
cbrt(27 ml) → 30 mm
instead of
(27 ml)^(1/3) → 30
* ignore -Wfree-nonheap-object for generated code
* replace 0 with Qt::NoModifier when creating a QKeyEvent
* in Qt 5.14 QCombobox::activated(QString) is deprecated, use textActivated
* don't mix QCheckBox::setChecked() with tristate API