* Sketcher: Prevent bad constraint names
Ensures the constraint names only contains alphanumericals and
underscores so that they can always be used in expressions.
That way, there cannot be any unicode character or quotes that
would need to be escaped.
Fixes: https://github.com/FreeCAD/FreeCAD/issues/19767
* Add helper function to check constraint names
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Lothaire Sicot <lothaire.sicot@telecom-paris.fr>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Sketcher: Auto-scroll to selected geometry elements
Currently if user selects a geometry element on sketch, listview is not
scrolling to it.
So, this patch moves the previously added logic to constraints into a
separate helper function call and calls it for Geometry Elements as
well, resulting in scrolling in both lists - constraints and elements.
* Sketcher: Add QListWidget to enable QListWidget symbols for CI
* Sketcher: Refactor DrawSketchHandler::seekAutoConstraint
* to squash
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update DrawSketchHandler.h
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* move to protected. To squash
* remove arc of ellipse forgotten if
* Update DrawSketchHandler.cpp
* Update src/Mod/Sketcher/Gui/DrawSketchHandler.h
Co-authored-by: Benjamin Bræstrup Sayoc <benj5378@outlook.com>
* Update DrawSketchHandler.h
* Update DrawSketchHandler.cpp
* revert hitshapedir
* Remove never used if condition
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Bræstrup Sayoc <benj5378@outlook.com>
1. No longer applying equality constraints between new (circular) pieces since
they may cause issues.
2. Only transfer equality with a different curve to one of the pieces.
3. Re-added certain constraints (that applied to both ends of the original
curve) that were incorrectly excluded from modification/deletion at a certain
step.
4. Use C++20 `std::erase_if()` in trim
* Fix various typos
Found via `codespell -q 3 -L aci,addmin,ake,aline,alle,alledges,alocation,als,ang,anid,anormal,anull,aply,apoints,ba,beginn,behaviour,bloaded,bottome,brushin,bu,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childrens,childs,colour,colours,commen,connexion,currenty,documentin,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,findn,fle,freez,graphin,groupe,hist,iff,incrementin,indexin,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,itsel,kilometre,leadin,localy,lod,mantatory,matc,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oce,oder,ontop,orgin,orginx,orginy,ot,pard,parm,parms,pres,programm,que,rady,recurrance,renderin,re-use,re-used,re-using,rin,ro,rougly,sectionin,seperator,sergent,serie,shs,sinc,siz,som,stpo,strack,substraction,te,technic,thist,thru,tread,tru,ue,uint,unter,uupper,uptodate,vas,vertexes,vew,wallthickness,whitespaces -S "./.git,*.po,*.ts,*.pdf,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./src/Base/StackWalker.cpp,./build/doc/SourceDoc,./tools/build/WindowsInstaller/lang,./src/Mod/TechDraw/Templates/locale"`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Coverity issue 545249. A temporary string is constructed, and its address stored via c_str(). That pointer is then used after the string is destroyed. The fix is to store the std::string.