Commit Graph

63 Commits

Author SHA1 Message Date
wmayer
888a33917d Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
wmayer
948cbfccd9 modernize C++: avoid bind
In many cases std::bind() is kept because the code is much simpler
2023-08-08 21:10:16 +02:00
wmayer
52e1c7c33b modernize C++: move from boost::bind to std::bind 2023-08-08 17:36:13 +02:00
wmayer
ec73caa40e modernize C++: make unique 2023-08-07 19:51:30 -06:00
wmayer
7a3106d31b modernize C++: use bool literals 2023-08-06 01:35:39 +02:00
wmayer
9f99285d59 modernize C++: use nullptr 2023-08-05 11:23:12 -06:00
Pesc0
c65f049d20 [Toponaming] create ElementMap class (#9175)
* Copypaste ElementMap
* Add MappedNameRef
* Fix missing include
* Copypaste `findTagInElementName`
* fix error introduced _somewhere_
* refactor toponaming constants
* Move `findTagInElementName` in `MappedName`
* reintroduce workaround to compile ElementMap
* Added missing functions copied from complexgeodata
* fix last compile errors, reorder and format files
* remove recursive refs to ComplexGeoData
* Add more comments
* fixed comments and added tests
* added FIXME, make functions private, misc fixes
* Move static functions from complexGeoData to PostfixStringReferences. Rename to ElementNamingUtils
* Fix broken includes due to previous change
* Revert constants from string to const char*
* added childmap tests and made hasher public
* Make functions private
* Added remaining tests
* removed bool return from `erase` functions
* fix missing appexport

Co-authored-by: John Dupuy <jdupuy98@gmail.com>
2023-06-15 09:05:24 -05:00
Chris Hennes
b4d10f29c2 App: Add None=0 to enumeration
Addresses Coverity CID 356649, uninitialized scalar.
2023-02-25 21:53:01 -06:00
luz paz
818e2b2841 Gui: fix trailing whitespace 2022-12-02 19:18:54 -06:00
marioalexis
ff1b4eff05 Gui: Replace C cast 2022-09-18 11:06:51 -05:00
berniev
ae53c9b0a4 Gui: Use auto and range-based for (#7481)
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. 
* When possible use a ranged for loop instead of begin() and end() iterators
2022-09-14 13:25:13 -05:00
wmayer
23961706be Gui: modernize C++: replace 'typedef' with 'using' 2022-08-29 14:09:18 +02:00
berniev
75fa455c5d Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
berniev
3d1f70765a Gui: redundant void 2 2022-08-08 10:21:44 +02:00
berniev
2db561561e Gui: use empty 2022-08-06 16:35:45 +02:00
berniev
066656f62a Gui: use emplace_back 2022-08-05 10:33:41 +02:00
Zheng, Lei
c443b8de53 Gui: fix ViewProviderLink transform with scale
Fixes FreeCAD/FreeCAD#7113
2022-07-30 19:12:03 +02:00
wmayer
85bd6b5c6b Fix several clazy issues:
* C++11 range-loop might detach Qt container [-Wclazy-range-loop-detach]
2022-07-24 23:48:37 +02:00
wmayer
25483b78be Fix several clazy issue:
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
2022-07-24 22:29:06 +02:00
wmayer
108c64dc46 Gui: fix crash in ViewProviderLink::currentDraggingPlacement() if there is no active dragger 2022-07-19 10:40:32 +02:00
andrea
7886d3cbf4 Remove unused code into GUI 2022-07-17 03:53:11 +02:00
Chris Hennes
afffaf467f Gui: Fix typo 2022-06-02 10:29:14 -05:00
luz paz
d2e5b70049 Crowdin: fix whitespace and typo in translation string
Fixes https://github.com/FreeCAD/FreeCAD-translations/issues/132
2022-05-08 18:21:04 +02:00
Zheng, Lei
03f0fe2039 Gui: fix crash on setup Link CopyOnChange objects 2022-05-05 11:37:38 -05:00
wmayer
6c21534191 Gui: issue #6765: Overlay Icons for Std Link nearly invisible small 2022-04-20 08:51:59 +02:00
Chris Hennes
5df3dbae6f Gui: PR6497 move return statement to new line 2022-03-29 12:33:50 -05:00
Zheng, Lei
6616433d47 Gui: expose Link CopyOnChange setup through context menu
The CopyOnChange setup is meant to let user select which dependency to
copy when changing configuration.
2022-03-26 10:19:20 -04:00
Zheng, Lei
fbbc89c52c App/Gui: support Link refresh on change of originally linked configurable object 2022-03-26 10:19:20 -04:00
wmayer
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
99191c6679 [Gui] So headers: remove unused includes
- also sort out some headers to be used in precompiled headers
- also move a boost header to precompiled headers
2022-03-16 02:01:32 +01:00
wmayer
b78dc894e1 Core: Fix several coverity issues:
* CID 350582: Big parameter passed by value
* CID 350639: Big parameter passed by value
* CID 305234: Uncaught exception
* CID 316529: Uncaught exception
* CID 350597: Uncaught exception
* CID 350623: Uncaught exception
* CID 332690: Uncaught exception
* CID 332700: Unchecked return value
* CID 350576: Uninitialized scalar field
* CID 350587: Uninitialized scalar variable
* CID 192606: Uninitialized scalar field
* CID 332699: Uninitialized pointer field
* CID 350561: Dereference null return value
* CID 350610: Dereference null return value
* CID 350567: Dereference after null check
2022-03-13 13:53:32 +01:00
wmayer
8f786ea6ef Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
a65c88d3c5 [Gui] ViewProviderLink etc.: remove unused includes
- also put headers to PreCompiled.h
2022-03-06 01:11:42 +01:00
Uwe
08a43f03ed [Gui] remove unused headers 2022-02-19 03:41:28 +01:00
Uwe
94c474cffb [Gui] ViewProviderLink: remove unused includes
- also sort them
2022-02-17 04:06:12 +01:00
Uwe
b5bef494be [Gui] fix include sorting mistake from previous commit 2022-02-17 03:53:57 +01:00
Uwe
732d8c3a21 [Gui] add context menu icon for Std_TransformManip
- the other context menu entries have icons and we use this icon already in the Edit menu

- also sort the includes
2022-02-17 03:49:02 +01:00
luz paz
d877ee4d47 Make source code comments use gender neutral pronouns
The changes also include some grammatical fixes as well.
2021-12-02 16:18:04 -05:00
Chris Hennes
3bb03af723 [Part] Coverity: dtors can't throw 2021-02-09 23:58:09 +01:00
luz paz
c93bf6cbae Gui: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the src/Gui code.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
2a50ac2252 PVS: V595 A pointer was utilized before it was verified against nullptr 2020-07-18 10:59:28 +02:00
wmayer
d6169d6478 boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
730154a684 boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
Zheng, Lei
50c678a6c3 Gui: improve ViewProviderLink transform editing 2020-01-07 07:37:28 -03:00
Zheng, Lei
2f53721d9d Gui: fix Std_Transform tool
The problem is caused by tracking of editing object placement
introduced in b25ad5e085a42800c0ebd7a507233f081fcee7ef.

After this commit, any editing object can disable placement tracking by
calling Gui::Document::setEditingTransform() inside either
ViewProvider::startEditing() or setEditingViewProvider().
2019-12-21 15:17:48 +01:00
Zheng, Lei
bb69daf18e Gui: fix ViewProviderLink::getElementPicked() when linked to group 2019-11-21 10:42:43 +01:00
luz.paz
30a717beac Fix typos and misc. formatting [skip ci]
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./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`
2019-10-21 16:02:23 -03:00
wmayer
4dabef8417 fix build failure with std::isdigit on Windows 2019-10-08 14:49:23 +02:00
Zheng, Lei
b81485d72d Gui: improve scale handling in SoFCCSysDragger
Because of the scale transformion in Link, the dragger may have
undesired behavior. This patch checks scaling factor in scenegraph
transformation, and auto scale the dragger axis accordingly.
2019-10-08 10:27:56 +02:00