* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Unused QString [-Wclazy-unused-non-trivial-variable]
* Missing emit keyword on signal call [-Wclazy-incorrect-emit]
* Don't call QList::operator[]() on temporary [-Wclazy-detaching-temporary]
* Use multi-arg instead [-Wclazy-qstring-arg]
* Maybe you meant to call ViewProvider2DObjectGrid::onChanged() instead [-Wclazy-skipped-base-method]
===================================================
This commit is an independent refactor of the identifications used at Sketcher level.
It introduces a new type "GeoElementId" as a combination of GeoId and PointPos.
It moves the Undefined GeoId, previous Constraint::GeoUndef to GeoEnum, together with all
other fixed values of GeoIds.
=============================================
This commit is directed to external functionality of the split() function.
1. getAppliedConstraints renamed to getConstraintIndices
This is just for clarity being a general function
2. SwapInvolvedGeometry functionality moved to Constraint class
Why?
i. Because it is a specific operation on a constraint, it must not be
a public function, as it does not define interface of the Sketch.
ii. It could be a lambda or a private utility function, but them it would not be reusable.
iii. It could be part of a helper class, but then, it is would be less reusable.
3. renaming of the flag passed to transferConstraints function
========================================
Report:
https://github.com/FreeCAD/FreeCAD/pull/4183https://github.com/realthunder/FreeCAD_assembly3/issues/387
Problem:
renameConstraint() previously implemented exclusively in SketchObjectPyImp.cpp,
will change the Constraints property without updating the solver. A prospective
drag operation would rely on a deleted pointer constraint which leads to the
crash.
Solution:
- mark the solver status as needing an update
- leverage new through sketchobject r/w interface to ensure solver is synchronised
before the temporary move operation starts
Bonus:
move the core of the function to SketchObject.cpp so that input data validity
check on constraint change is inhibited.
==============================
Do not copy/array internal alignment geometry if the geometry it defines is not part of the operation. Silently ignore it.
If the reference for the operation is one such geometry (or it is the only one), then abort the operation.
=========================================================
This ensures that the exception back in the c++ that invoked python retains the type of exception and can be properly catched.
=======================================================
set/get/toggle python interface to enable to set the virtual space status of a constraint via SketchObject.