Commit Graph

1442 Commits

Author SHA1 Message Date
Chris Hennes
f7edc74eee App: PR6497 move return statement to new line 2022-03-29 12:33:37 -05:00
Adrian
a6f881023f fix creation of backup file even when numberOfFiles<=0 in applyTimeStamp
and move file deletion inside if (fi.exists()) block
2022-03-28 19:17:43 +02:00
Adrian
cf2556db1b move tmp file rename after file deletion in applyTimeStamp when numberOfFiles <=0 [fixes #6532] 2022-03-28 19:17:43 +02:00
Zheng, Lei
c3fcf39e9c App: minor change to LinkParams 2022-03-26 10:19:20 -04: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
9455d869d4 Gui: refactor Object Selection Dialog
It is originally used for dependency selection when copying object.
Modified to improve auto dependency selection, and for use by Link
configuration object setup, which also involves dependency selection.
2022-03-26 10:19:20 -04:00
Zheng, Lei
817cfe5a44 App: fix recompute problem caused by expression hidden reference 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
Uwe
41c42eb311 [App] add property for electric potentials
- in preparation to fix the electrostatic simulation mess
2022-03-26 01:39:32 +01:00
wmayer
d21a60b294 All: modernize C++11
* replace deprecated headers
2022-03-23 22:44:18 +01:00
wmayer
be7e18757c App: fix for Py3.8 or newer 2022-03-23 18:03:58 +01:00
Uwe
cd2d1830e3 [App] intermediate compilation fix
- needed for the CI as well as for MSVC
2022-03-23 17:52:52 +01:00
wmayer
1a20b7f119 App: modernize C++11
* use nullptr
2022-03-23 17:29:23 +01:00
Chris Hennes
c996f3040d App: Fix missing ignored variable 2022-03-21 09:40:28 -05:00
Chris Hennes
af041fb4d6 App: Add Metadata content type test 2022-03-21 09:24:51 -05:00
wmayer
1a62c2024d lgtm: removes unused imports in Python scripts 2022-03-20 23:00:55 +01:00
wmayer
585bcb8708 lgtm: [skip ci] FIXME comment
Change FIXME or remove it
2022-03-20 16:51:23 +01:00
wmayer
65a6575921 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
a0d6310658 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
fa81d0d21c App: [skip ci] fix warning 2022-03-20 13:41:45 +01:00
wmayer
02ac1508ff App/Gui: make operator-> operator of WeakPtrT constant 2022-03-19 15:35:58 +01:00
wmayer
c6398bbbe0 App: make sure to create parent directories of a document's transient directory 2022-03-19 13:58:10 +01:00
wmayer
e785569f7b App: use static functions of FileInfo to convert between path and string 2022-03-19 13:57:24 +01:00
wmayer
e4d1ed8366 Base: rename BaseExceptionFreeCADError to PyExc_FC_GeneralError 2022-03-17 14:45:48 +01:00
wmayer
1f12dca2b4 Py: replace BaseExceptionFreeCADError with more suitable exception types 2022-03-17 13:54:23 +01:00
wmayer
6e5feb5ccc App: change base types of some exceptions and raise XML exceptions in MetadataPy::PyInit 2022-03-17 11:43:59 +01:00
wmayer
a90a39a4c9 Base: add more custom Python exception types 2022-03-17 11:29:09 +01:00
wmayer
0f9768fb33 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
46cd740269 App: Improve Metadata error handling
Report XML parse exception details.
2022-03-13 21:01:47 -05:00
Chris Hennes
4fc8ee56a6 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
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
5fd93b7d3b 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
b34a00fe14 App: add convenience method DocumentObject::clearExpression() 2022-03-10 12:09:57 +01:00
wmayer
042d9d248e 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
55bd9677a9 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
08b77bff08 Core/Mod: modernize C++11
* use nullptr
2022-03-09 21:55:31 +01:00
Chris Hennes
0c85c16932 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
7d1a64e1c1 [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
f1f68db55b App: Optimize includes to reduce compile time 2022-03-07 15:53:58 +01:00
wmayer
4b0658a3a6 App: include cstddef to get definition of size_t 2022-03-07 01:00:14 +01:00
Uwe
cdff8e19dc Revert "[App] add a missing return statement (#6519)"
This reverts commit 5c7ef17ac063f9339c68333afecf1cd88404b959.
2022-03-07 00:50:18 +01:00
wmayer
4a343ab31e 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
26ece78df4 [App] add a missing return statement (#6519)
* [App] add a missing return statement

as discussed here: ceae048a43 (commitcomment-68066635)
2022-03-06 23:20:05 +01:00
wmayer
91e4e468dd 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
f274c63e0e [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
8250cab590 [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
5e0cfc64ee App: use forward declarations 2022-03-04 21:09:46 +01:00
wmayer
2a33fe77f6 App/Gui: move template classes (ViewProvider)ExtensionPythonT to their own header files 2022-03-04 18:54:42 +01:00
wmayer
1cbecdf122 App: use forward declaration to reduce compile time 2022-03-04 17:27:53 +01:00
wmayer
6c2e1a2d6e 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