Commit Graph

42 Commits

Author SHA1 Message Date
tritao
40a9f46d71 Base: Remove Boost-based signals and switch to FastSignals. 2026-01-07 21:16:16 +00:00
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
PhoneDroid
c913317c28 [ Base ]: Updated SPDX 2025-10-14 10:00:04 -05:00
Markus Reitböck
5a423dab39 Base: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:01 +02:00
Ladislav Michl
9683cf1e4f Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
Kacper Donat
cc2efa90f8 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
5e47f6804f 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
83abfa49b8 Base: handle exceptions in ParameterGrpPy 2024-04-17 21:52:32 +02:00
wmayer
becf03c92d Base: expose a method to copy a parameter group to Python 2024-04-01 14:56:19 +02:00
wmayer
322fcc6bad Base: expose a method to rename a parameter group to Python 2024-04-01 14:43:23 +02:00
wmayer
b998bc181c Base: Fix linter warnings in ParameterPy 2024-04-01 14:23:41 +02:00
wmayer
3ac4dc0686 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
365e7136cd 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
bd88162b9d 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
985def3416 Base: apply clang format 2023-11-13 12:01:26 -05:00
wmayer
097d5d6fee Base: C++ core guidelines: init variables 2023-08-24 18:48:52 +02:00
wmayer
761905dbc2 Base: modernize C++: use range-based for loop 2023-08-14 14:09:29 +02:00
wmayer
97283c6815 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
01f7782124 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
4e42ff7baa Base: modernize C++: replace 'typedef' with 'using' 2022-08-29 11:42:09 +02:00
berniev
15419982d4 Base: Modernise ctors dtors defs etc 2022-08-02 12:37:46 +02:00
wmayer
8c35e7776c Base: [skip ci] optimize iteration over container with parameter group elements 2022-03-29 15:25:54 +02:00
wmayer
c01846c3e7 Base: fix handling of path separators in parameter group names 2022-03-29 14:54:03 +02:00
Uwe
8335466b27 [Base] Parameter and Matrix: remove unused includes 2022-03-02 13:28:34 +01:00
wmayer
c563198b35 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
59b7e9fdd0 Base: remove Py2 code 2021-04-26 09:23:58 +02:00
luz paz
01b21e0d06 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
luz paz
df93939be3 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
011e5aedfa 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
2e7bcde56b expose some more methods of ParameterGrp to Python 2018-09-16 19:36:46 +02:00
wmayer
67b990c2b5 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
ef11efce55 check for null string 2017-10-04 20:03:59 +02:00
wmayer
58c7b37661 include missing header 2017-10-04 18:58:40 +02:00
wmayer
bce521877d expose Attach/Detach of parameter group class to Python 2017-10-04 17:16:22 +02:00
Yorik van Havre
515f2efb1d Implemented python method ParameterGrpPy::GetContents() : lists all the parameters inside a group 2016-09-03 19:49:59 -03:00
Yorik van Havre
227c9bf488 Fixed non dereferenced py pointer in ParameterPy 2016-02-01 13:34:37 -02:00
Yorik van Havre
4a146e5fc7 Fixed wrong value returned by ParameterPy::GetUnsigned 2016-01-30 17:24:28 -02:00
wmayer
8a3dbc5d09 + base ParameterGrpPy class on PyCXX and fix usage of unsigned values 2016-01-27 18:05:56 +01:00
wmayer
6b67d4a4e7 + 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
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
6f48bd86c3 + 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