Commit Graph

896 Commits

Author SHA1 Message Date
wmayer
dc3986ee10 Base: add method isEqual() to Base::Flags<> to simplify comparison 2022-04-05 19:09:14 +02:00
0penBrain
65822ec2f8 Base: fix quantity construction when unit as string is empty 2022-04-02 18:09:35 +02:00
wmayer
26a6c085c2 Base: [skip ci] make Flags<>::testFlag a const method 2022-03-31 23:17:48 +02:00
wmayer
e0e523e626 Base: fix possible Python type mismatch for Base::Vector2dPy
when using FreeCAD as a pure Python module.

See forum topic: https://forum.freecadweb.org/viewtopic.php?f=10&t=67617
2022-03-31 15:08:48 +02:00
Chris Hennes
3b42d4afac Base: PR6497 move return statement to new line 2022-03-29 12:34:34 -05: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
wmayer
988a96b457 Base: make Parameter class less vulnerable for invalid user config files 2022-03-24 11:43:39 +01:00
wmayer
93f0c64704 Base: [skip ci] remove several superfluous static_cast 2022-03-24 11:27:55 +01:00
wmayer
97330443a2 All: modernize C++11
* replace deprecated headers
2022-03-23 22:44:18 +01:00
wmayer
882e34f2ce Base: modernize C++11
* use nullptr
2022-03-23 16:57:25 +01:00
wmayer
c9a0fae9db lgtm: [skip ci] FIXME comment
Change FIXME or remove it
2022-03-20 16:51:23 +01:00
wmayer
27a2646415 Base: [skip ci] lgtm: Inconsistent definition of copy constructor and assignment ('Rule of Two') 2022-03-20 16:30:14 +01:00
wmayer
c8edbe0c30 Base: [skip ci] cleaning up modules is only needed for leak detectors 2022-03-20 13:39:22 +01:00
wmayer
be56aa082e Base: [skip ci] fix build failure if PCH is enabled 2022-03-20 13:34:32 +01:00
Uwe
c1ba1545a7 [Base] a compile for for MSVC 2022-03-19 15:02:19 +01:00
wmayer
a817a68c17 Base: add method FileInfo::createDirectories() to also create parent directories of a given path 2022-03-19 13:56:06 +01:00
wmayer
9160f06e1c Base: rename BaseExceptionFreeCADError to PyExc_FC_GeneralError 2022-03-17 14:45:48 +01:00
wmayer
d69defaa3c Py: replace BaseExceptionFreeCADError with more suitable exception types 2022-03-17 13:54:23 +01:00
wmayer
10a13c6dbc Base: add more custom Python exception types 2022-03-17 11:29:09 +01:00
wmayer
a22608b7b5 Base: let interpreter keep track of created modules 2022-03-13 22:34:01 +01:00
wmayer
2dc78804b6 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
68b92c504f Fix several coverity issues:
* CID 350617: Dereference after null check
* CID 350585: Out-of-bounds read
* CID 350624: Resource leak
* CID 332701: Uncaught exception
* CID 350642: Uninitialized scalar field
* CID 350590: Uninitialized scalar field
* CID 350629: Uninitialized scalar variable
* CID 350602: Uninitialized scalar variable
* CID 350564: Uninitialized scalar variable
* CID 350548: Uninitialized scalar variable
2022-03-13 12:12:49 +01:00
wmayer
8d3c66cf18 Core/Mod: modernize C++11
* use nullptr
2022-03-09 21:55:31 +01:00
wmayer
6384f367d2 Base: [skip ci] change identation in Console.h 2022-03-09 01:04:16 +01:00
Uwe
42c7eb02f3 [Base] compile fix for Windows without PCH 2022-03-08 03:00:36 +01:00
wmayer
38471cc76b Base: [skip ci] Optimize includes to reduce compile time 2022-03-07 16:49:01 +01:00
wmayer
e4435cdcba Base/App: fix warnings from code analysers:
* convert old-style-casts to explicit C++ casts where possible
* make some implicit conversions explicit
2022-03-06 23:49:30 +01:00
wmayer
51b7d98788 Base: [skip ci] revert copyright change 2022-03-06 22:20:35 +01:00
Stefan Brüns
bd58a73731 Base: Fix wrong character encoding for micro-siemens
Contrary to any other Unit with micro prefix (e.g. ug, uH, uF) the
string was created with a Latin1 encoding instead of UTF-8.

The problem can be verified with these python statements:
```
FreeCAD.Units.schemaTranslate(FreeCAD.Units.MicroSiemens, 0)
FreeCAD.Units.schemaTranslate(FreeCAD.Units.MicroGram, 0)
```
2022-03-06 11:20:09 -05:00
Uwe
f2c8bdd525 [Base] ConsoleObserver: fix compilation with precompiled headers 2022-03-06 15:08:09 +01:00
Uwe
64ddcc68fc [Base] ConsoleObserver: correct copyright 2022-03-06 14:51:58 +01:00
wmayer
58a719e207 Base: move ILogger sub-classes to their own source files in order to reduce including stream classes in client code 2022-03-06 10:13:47 +01:00
wmayer
2465840791 Base: fix warnings from code analysers:
* replace some C-style casts with static_cast
* remove unneeded destructors
* define default copy-constructor and assignment operator
2022-03-05 19:03:21 +01:00
wmayer
032cea587d Base: implement a lightweight smart pointer for PyObject like Py::Object to reduce includes of Python.h in header files 2022-03-04 15:51:51 +01:00
wmayer
6c1e940b69 Base: use forward declaration instead of including Python.h 2022-03-03 19:18:07 +01:00
wmayer
c07473ba5b Base: use forward declaration instead of including Python.h 2022-03-03 17:37:13 +01:00
Yorik van Havre
88d12c6842 Fixed missing include 2022-03-03 13:12:46 +01:00
Uwe
39ce4dde0d [Base] Exception and others: remove unused includes 2022-03-03 01:01:10 +01:00
Uwe
1eeb1fecd0 [Base] BoundBox etc.: remove unused includes 2022-03-02 13:59:59 +01:00
Uwe
7bb7efc55f [Base] Parameter and Matrix: remove unused includes 2022-03-02 13:28:34 +01:00
Uwe
a5c838fefc [Base] some sorting and cleanup 2022-03-02 01:51:05 +01:00
Uwe
6afab502ca [Base] Geometry etc.: remove unused includes 2022-03-01 13:56:02 +01:00
wmayer
60ee579fb4 Base: fix warnings reported by code analysers
* disable copy-constructor and assignment operator for Stream classes
* remove destructor of sub-classes of SequencerBase
* fix some old C-style cast warnings
2022-03-01 12:20:27 +01:00
Uwe
9a42b61fcb [Base] Py and Placement: remove unused includes 2022-03-01 12:13:58 +01:00
Uwe
f20840442f [Base] Quantity, Rotation, Stream: remove unused includes 2022-03-01 11:27:54 +01:00
Uwe
7b14b3b02e [Base] Reader and Writer: remove unused includes 2022-02-27 23:54:00 +01:00
Uwe
6a606783d6 [Base] remove unused code 2022-02-27 19:30:09 +01:00
wmayer
a5bc46afb2 Base: fix build failure with MSYS/clang 2022-02-26 12:08:02 +01:00
wmayer
f24fe8157a Base: [skip ci] fix build failure with MSYS/clang 2022-02-26 11:16:57 +01:00