Commit Graph

1432 Commits

Author SHA1 Message Date
wmayer
3bdf1fecce App: fix for Py3.8 or newer 2022-03-23 18:03:58 +01:00
Uwe
9581790055 [App] intermediate compilation fix
- needed for the CI as well as for MSVC
2022-03-23 17:52:52 +01:00
wmayer
749361d2f3 App: modernize C++11
* use nullptr
2022-03-23 17:29:23 +01:00
Chris Hennes
1d74892f34 App: Fix missing ignored variable 2022-03-21 09:40:28 -05:00
Chris Hennes
9fe1bdb092 App: Add Metadata content type test 2022-03-21 09:24:51 -05:00
wmayer
cf7fd5d2ac lgtm: removes unused imports in Python scripts 2022-03-20 23:00:55 +01:00
wmayer
c9a0fae9db lgtm: [skip ci] FIXME comment
Change FIXME or remove it
2022-03-20 16:51:23 +01:00
wmayer
702222b5a2 App: [skip ci] lgtm: Declaration hides parameter
Local variable 'obj' hides a parameter of the same name.
2022-03-20 16:46:16 +01:00
wmayer
32e9984751 App: [skip ci] lgtm: Large object passed by value
This parameter of type pair<const basic_string<char, char_traits<char>, allocator<char>>, Metadata> is 672 bytes - consider passing a const pointer/reference instead.
2022-03-20 16:42:48 +01:00
wmayer
a93cec09bc App: [skip ci] fix warning 2022-03-20 13:41:45 +01:00
wmayer
a60754ea93 App/Gui: make operator-> operator of WeakPtrT constant 2022-03-19 15:35:58 +01:00
wmayer
b84e41bc89 App: make sure to create parent directories of a document's transient directory 2022-03-19 13:58:10 +01:00
wmayer
25bae6343b App: use static functions of FileInfo to convert between path and string 2022-03-19 13:57:24 +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
11895f8d59 App: change base types of some exceptions and raise XML exceptions in MetadataPy::PyInit 2022-03-17 11:43:59 +01:00
wmayer
10a13c6dbc Base: add more custom Python exception types 2022-03-17 11:29:09 +01:00
wmayer
0054cbddaa Fix coverity issue:
* CID 332682: Resource leak
* CID 350607: Resource leak
* CID 332677: Resource leak
2022-03-14 11:35:04 +01:00
Chris Hennes
2fc9c93235 App: Improve Metadata error handling
Report XML parse exception details.
2022-03-13 21:01:47 -05:00
Chris Hennes
2ac4e60ab5 App: Fix Metadata Py constructors
Also adds unit tests for the corrected Copy and Default constructors.
2022-03-13 21:01:47 -05: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
2a73ac7cb1 App: add convenience method DocumentObject::clearExpression() 2022-03-10 12:09:57 +01:00
wmayer
fa0e6dfa9e App: correctly handle int as argument for ocumentPy::getObject
Add a unit test to confirm correct behaviour
2022-03-09 23:02:22 +01:00
wmayer
ae94c8489c App: [skip ci] fix bug in Metadata::supportsCurrentFreeCAD()
clang prints the warning: operator '?:' has lower precedence than '<<'; '<<' will be evaluated first [-Wparentheses]
2022-03-09 22:05:14 +01:00
wmayer
8d3c66cf18 Core/Mod: modernize C++11
* use nullptr
2022-03-09 21:55:31 +01:00
Chris Hennes
f122061424 Core: Support disabling Addon by FreeCAD version
If package.xml metadata file exists, it is scanned for FreeCAD version
compatibility before the Addon is loaded. If the Addon specifies that it is
explicitly not compatible with the current version of FreeCAD, the Addon is
not loaded.
2022-03-08 23:19:04 -06:00
Uwe
2c86fe2ab1 [App] AutoTransaction: a change to silence MSVC compiler
as proposed here: https://github.com/FreeCAD/FreeCAD/pull/6519#discussion_r820641762
2022-03-07 20:34:02 +01:00
wmayer
4977e55e51 App: Optimize includes to reduce compile time 2022-03-07 15:53:58 +01:00
wmayer
c3138db55f App: include cstddef to get definition of size_t 2022-03-07 01:00:14 +01:00
Uwe
8bca1e00ec Revert "[App] add a missing return statement (#6519)"
This reverts commit 1be4ed57ae.
2022-03-07 00:50:18 +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
Uwe
1be4ed57ae [App] add a missing return statement (#6519)
* [App] add a missing return statement

as discussed here: c96f61b0a1 (commitcomment-68066635)
2022-03-06 23:20:05 +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
Uwe
c96f61b0a1 [App] next attempt to fix CI build error
- revert previous commit and re-add application as header
2022-03-06 03:25:14 +01:00
Uwe
befd041147 [App] try to fix CI build failure
- since I have no clue what the error is about:
https://gitlab.com/freecad/FreeCAD-CI/-/jobs/2167699355
I follow MSVC's advice that tells me that a function definition in the .cpp file is missing
2022-03-06 03:02:14 +01:00
wmayer
95c70e7f4c App: use forward declarations 2022-03-04 21:09:46 +01:00
wmayer
ca3c8185e0 App/Gui: move template classes (ViewProvider)ExtensionPythonT to their own header files 2022-03-04 18:54:42 +01:00
wmayer
4ae1ca58d1 App: use forward declaration to reduce compile time 2022-03-04 17:27:53 +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
4d9ddcfa66 App: move member DocumentPythonObject to DocumentP 2022-03-03 20:28:47 +01:00
Chris Hennes
3af20938cd Core: Remove Init.py stop file check from inner package loop
Check was unused, only stop files located at the top-level should halt loading.
2022-03-02 10:00:52 -06:00
Uwe
8a9ee1951b [App] remove header
slipped in with previous commit but will be part of a PR
2022-03-02 01:53:28 +01:00
Uwe
a5c838fefc [Base] some sorting and cleanup 2022-03-02 01:51:05 +01:00
wmayer
9955c64752 Mod: add string header to dxf.h 2022-03-01 17:18:29 +01:00
wmayer
7f8940b858 App: [skip ci] Add enum value to suppress error messages on document recompute 2022-02-28 17:54:25 +01:00
Uwe
40c7b1660b [App] Origin and Part: remove unused includes 2022-02-28 13:15:23 +01:00
Chris Hennes
853aa8c93e Core: Correct metadata docs 2022-02-27 23:33:07 -06:00
Uwe
178e082271 [App] Object, Meta, Merge: remove unused includes 2022-02-28 01:02:06 +01:00
Uwe
3a88639e19 [App] remove unused code and some header sorting 2022-02-28 00:17:16 +01:00