Also includes fixes for instance data and resolving of textvar
references.
Also includes virtual d'tors for IBIS parser to get rid of all the
compile warnings on CLang.
Fixes https://gitlab.com/kicad/code/kicad/issues/12357
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
Keeping them in base_units means that we can't introduce
any dependence on these functions to anything that needs to
compile without one of the unit defines (EESCHEMA, PCBNEW, etc)
This function is used in UNIT_BINDER, that does not accept floating notation
with exponent, that can be generated by parseSetResult().
As a result: values < 0.0001 cannot be entered in a UNIT_BINDER.
This moves the generated files out of the source tree and into
the build directory. They are now regenerated each time they are
needed, based on the timestamp of the generated file compared to
the timestamp of the lemon file.
To do this, we also bundle lemon into the thirdparty directory
and build it for ourselves since it is a very tiny program and
not all platforms seem to distribute it in a consistent manner.
Fixes https://gitlab.com/kicad/code/kicad/issues/5013
On some platforms like MSVC, NaN prints as "-nan(ind)". This
is a bit needlessly ugly, so print "NaN" on all platforms
consistently.
This fixes a test failure on MSVC.
If you use add_custom_command to generate the grammar file,
it can be removed by "make clean". This then means the user will
need to get it back from Git, or regenerate it with Lemon.
Changing to add_custom_command removes the output file
from the clean list. The incantation to rebuild the grammar
remains the same: "make libeval_grammar", and it is still not
required to have lemon installed for a normal build.
Fixes: lp:1809610
* https://bugs.launchpad.net/kicad/+bug/1809610
The libeval grammar can now be rebuilt with "make libeval_grammar".
This is only possible when lemon is installed.
Also a couple of modifications to the lemon grammar to
account for external changes since the grammer was last generated.
Also move the grammar defines into grammar.h - this is how
Lemon produces them, and by manually copying into the target .cpp,
it make automated regeneration impossible.
It would appear that some platforms process the KILL_FOCUS event
after running TransferDataFromWindow(). This change makes sure
that the evaluation is done no matter the order.
Fixes: lp:1793911
* https://bugs.launchpad.net/kicad/+bug/1793911
The general idea is to support user-units inheritance. The
UNIT_BINDER allows wrapped controls to inherit units from their
parent dialog, while KEYWAY_HOLDER and DIALOG_SHIM allow child
KEYWAY_HOLDERs or DIALOG_SHIMs to inherit units from their
parent.
The GetUserUnits() method signature has to move to KEYWAY_HOLDER
rather than KEYWAY_PLAYER (where it makes more sense) as it’s the
only common ancestor of KEYWAY_PLAYER and DIALOG_SHIM.
As long as we'll be using the UNIT_BINDER more widely, it also
makes sense to move evaluation and validation into it.
This commit also provides eeschema’s DIALOG_LABEL_EDITOR and
pcbnew’s DIALOG_TRACK_VIA_PROPERTIES and DIALOG_SET_GRID as
models of how to use the new user-units inheritance, eval, and
validation.
Fixes: lp:593795
* https://bugs.launchpad.net/kicad/+bug/593795
(cherry picked from commit c8bc53e)
Clearing bClError flag in NumericEvaluator::parseOk() made the
expression look valid, even if the flag has been set for a previous
token. Now it is cleared before an expression is parsed and verified
after parser finishes.
Fixes: lp:1756995
* https://bugs.launchpad.net/kicad/+bug/1756995
If ',' is used as decimal separator by the current locale a '.' is also accepted.
Also add support for units "mi", "th" and "in" as described in the documentation of pcbnew.
Fixes: lp:1751315
* https://bugs.launchpad.net/kicad/+bug/1751315