Commit Graph

38 Commits

Author SHA1 Message Date
Ladislav Michl
c293d74566 Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
Kacper Donat
12a69fe296 Base: Add isNullOrEmpty string helper
This adds isNullOrEmpty string helper that cheks if string is... well
null or empty. It is done to improve readability of the code and better
express intent.
2025-02-21 15:04:43 +01:00
Chris Hennes
d01ce32a1f Update for LibPack3 (#10337)
* cMake: Add base support for LibPack3

Minor changes to FreeCAD source code to support compiling with Qt 6.5 on MSVC,
and changes to cMake setup to support the new Libpack.

* NETGENPlugin: Fix compilation with MSVC and OCCT 7.8

* Material: Switch to Wrapped_ParseTupleAndKeywords for /fpermissive- on MSVC

* Base: Prevent accidental definition of MIN and MAX by MSVC

* cMake: Prevent accidentally finding an old LibPack

* Material: Wrap another ParseTuple call

* OCCT: Modify includes for 7.8.x

* Part: Change TNP code to use Wrapped_ParseTupleAndArgs

* Spreadsheet: Workaround for MSVC macro pollution

* Mesh: Workaround for MSVC macro pollution

* Base: Remove extra MSVC flag (moved to CMake)

* Tests: Fix compiling with /permissive-

* FEM: Fix Qt warnings about duplicate element names

* cMake: Ensure major version numbers are set

* Address review comments.

* cMake: Further tweaks for LibPack3

* cMake: Modify specification of compiler flags for MSVC

* Main: Remove QtQuick testing code

* cmake: Find Boost before SMESH (which uses it)

* Fixes for LibPack2

* cMake: Another try at importinhg VTK cleanly
2024-06-24 18:25:05 +02:00
wmayer
0226770b4c Base: handle exceptions in ParameterGrpPy 2024-04-17 21:52:32 +02:00
wmayer
c3f70bfa7f Base: expose a method to copy a parameter group to Python 2024-04-01 14:56:19 +02:00
wmayer
e16ccc33ce Base: expose a method to rename a parameter group to Python 2024-04-01 14:43:23 +02:00
wmayer
a0e901defd Base: Fix linter warnings in ParameterPy 2024-04-01 14:23:41 +02:00
wmayer
08b10cd287 fix cppcoreguidelines-*
* cppcoreguidelines-init-variables
* cppcoreguidelines-c-copy-assignment-signature
* cppcoreguidelines-macro-usage
* cppcoreguidelines-non-private-member-variables-in-classes
* cppcoreguidelines-pro-type-member-init
* cppcoreguidelines-slicing
* cppcoreguidelines-special-member-functions
* cppcoreguidelines-virtual-class-destructor
2023-11-16 01:22:09 +01:00
wmayer
39337ea12e fix bugprone-*
* bugprone-throw-keyword-missing
* bugprone-unhandled-self-assignment
* bugprone-suspicious-string-compare
* bugprone-reserved-identifier
* bugprone-narrowing-conversions
* bugprone-macro-parentheses
* bugprone-implicit-widening-of-multiplication-result
* bugprone-exception-escape
* bugprone-copy-constructor-init
2023-11-16 01:22:09 +01:00
wmayer
f539138dd9 fix readability-*:
* readability-const-return-type
* readability-container-data-pointer
* readability-container-size-empty
* readability-delete-null-pointer
* readability-else-after-return
* readability-inconsistent-declaration-parameter-name
* readability-redundant-member-init
* readability-redundant-smartptr-get
* readability-redundant-string-cstr
* readability-use-anyofallof
* readability-static-definition-in-anonymous-namespace
* readability-static-accessed-through-instance
* readability-simplify-boolean-expr
2023-11-16 01:22:08 +01:00
wmayer
e85c383bff Base: apply clang format 2023-11-13 12:01:26 -05:00
wmayer
010dca8303 Base: C++ core guidelines: init variables 2023-08-24 18:48:52 +02:00
wmayer
367cdb36ed Base: modernize C++: use range-based for loop 2023-08-14 14:09:29 +02:00
wmayer
60ae885471 Base: Remove redundant 'else' and return Py::None() instead of Py::Object() to make it explicit that Python's 'None' is meant 2022-12-05 12:51:38 +01:00
Zheng, Lei
d3c063f88c Base/App: add new signal interface to Parameter
Added new signal interface using boost::signals2 signalParamChanged.

Exposed to Python as ParameterGrpPy.AttachManager() to monitor changes
to all parameters, sub groups under the referring group.

Added new attribute for ParameterGrp(Py) to query the Parent and Manager
of the referring group.
2022-12-03 17:08:17 -06:00
wmayer
d2168f51b9 Base: modernize C++: replace 'typedef' with 'using' 2022-08-29 11:42:09 +02:00
berniev
8aff4a7503 Base: Modernise ctors dtors defs etc 2022-08-02 12:37:46 +02:00
wmayer
2578c3d2ac Base: [skip ci] optimize iteration over container with parameter group elements 2022-03-29 15:25:54 +02:00
wmayer
b47029998e Base: fix handling of path separators in parameter group names 2022-03-29 14:54:03 +02:00
Uwe
7bb7efc55f [Base] Parameter and Matrix: remove unused includes 2022-03-02 13:28:34 +01:00
wmayer
af16ab02a0 Base: remove some more deprecated Py2 code
and remove deprecated void from function signature and replace 0 or NULL with nullptr
2021-04-26 10:29:48 +02:00
luz paz
142c2c2c4d Base: remove Py2 code 2021-04-26 09:23:58 +02:00
luz paz
d5f6c096b8 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
luz paz
b0d7850406 Fix various typos [skip-ci]
Found via `codespell v2.0.dev0`  
```
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,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,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
```
2020-10-08 18:21:15 +02:00
luz.paz
6f11ed298a src/Base: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/Base` files
2019-12-25 11:38:58 +01:00
wmayer
476a07ae24 expose some more methods of ParameterGrp to Python 2018-09-16 19:36:46 +02:00
wmayer
74b7373e48 fixes #0002323: Workbench Start recent list of 3 files is - after a crash - not sync with recent list in File Menu Recent list of 4 files 2017-10-05 10:38:42 +02:00
wmayer
9d977b90a4 check for null string 2017-10-04 20:03:59 +02:00
wmayer
6df1ace5d5 include missing header 2017-10-04 18:58:40 +02:00
wmayer
cea54396e7 expose Attach/Detach of parameter group class to Python 2017-10-04 17:16:22 +02:00
Yorik van Havre
ecb3759178 Implemented python method ParameterGrpPy::GetContents() : lists all the parameters inside a group 2016-09-03 19:49:59 -03:00
Yorik van Havre
c25595266b Fixed non dereferenced py pointer in ParameterPy 2016-02-01 13:34:37 -02:00
Yorik van Havre
2cb06c6f65 Fixed wrong value returned by ParameterPy::GetUnsigned 2016-01-30 17:24:28 -02:00
wmayer
dec030b34e + base ParameterGrpPy class on PyCXX and fix usage of unsigned values 2016-01-27 18:05:56 +01:00
wmayer
ee28daa669 + replace old C casts with static_cast in generated C++ code, remove unused parent structure of Python classes, support of -1 as return value of setCustomAttributes 2015-09-27 22:08:08 +02:00
Mateusz Skowroński
43a4a5938c Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
ab24e9df6a + Implement repr() method of Python binding for ParameterGrp 2015-01-05 13:45:46 +01:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00