Commit Graph

2213 Commits

Author SHA1 Message Date
Chris Hennes
f0fc6ccde1 Base: Remove deprecated Py_GetPath call
Replace it with a piece of code that replicates the functionality. Also eliminate the round-trip through char * that this function was using (the final variable is stored as a std::string anyway).
2025-03-22 18:59:05 -05:00
Chris Hennes
00e648220a App: Check for an invalid enum before proceeding 2025-03-22 07:15:15 +01:00
Chris Hennes
c252f40b6f App: Don't use std::forward inside loop
std::forward implies that sometimes its argument will be *moved*, leaving it invalid in the calling code. If that call is inside a loop that tries to reuse the data we have undefined behavior.
2025-03-22 07:15:15 +01:00
tritao
176f91eea8 App: Remove XML binding files.
This PR removes the App XML API bindings files now that we have
equivalent Python binding files.
2025-03-21 16:43:59 +01:00
Florian Foinant-Willig
7bf1b5d787 Fix FreeCAD#19588 2025-03-20 20:14:50 +01:00
tritao
e1c51becdc App: Modernize Python bindings with new API model. 2025-03-20 11:07:27 +01:00
xtemp09
6cfec14545 [App] Fix the crash reported in #20212 2025-03-19 00:23:22 -03:00
Chris Hennes
c1ada6bc40 App: Coverity fixes 2025-03-18 15:59:22 +01:00
Chris Hennes
d850e87567 Base: Coverity cleanup 2025-03-18 15:59:22 +01:00
Thomas Gimpel
dbfc0b47b6 App: reverted commit 8ff4b1b and improved comments in order to fix the MacOS build (#20068) 2025-03-17 20:23:01 +01:00
tritao
6c2c6847eb CMake: Cleanup targets with transitive dependencies 2025-03-17 12:12:06 +00:00
Chris Hennes
5f623390fb Merge pull request #20142 from bofdahof/ranges
Apply C++20 std::ranges (mainly to std::find)
2025-03-17 03:08:27 -05:00
Chris Hennes
4fcdac28fb Merge pull request #19583 from hyarion/refactor/base-type
Refactor Base::Type
2025-03-17 00:03:22 -05:00
Chris Hennes
b89ad30bc0 Merge pull request #19917 from tritao/refactor-document-recompute
Core: Refactor code around document and feature recompute
2025-03-16 23:59:12 -05:00
bofdahof
4a16ea41a7 App: apply std::ranges 2025-03-16 17:14:38 -05:00
Chris Hennes
dced463dc6 Merge pull request #19428 from tritao/base-tracy-profiler
Base: Add Tracy frame profiling support.
2025-03-14 04:12:05 +00:00
Joao Matos
7ae14d6bd5 Base: Add build support and instrumentation for the Tracy profiler. 2025-03-14 03:41:30 +00:00
Chris Hennes
bfd1fa47d8 Merge pull request #20049 from hyarion/fix/ppa
Refactor static type checks
2025-03-10 16:53:00 +00:00
Chris Hennes
ae01fcc3de Merge pull request #20064 from bofdahof/application-remove-some-using-namespace
[App] Application remove some using namespace
2025-03-10 16:42:28 +00:00
Benjamin Nauck
ad59054918 Refactor static type checks 2025-03-09 17:50:20 +01:00
bofdahof
2d3f0d714d cleanup commented lines 2025-03-08 13:37:46 +10:00
bofdahof
ae9eec20a6 remove using namespace Base::FileInfo 2025-03-08 13:37:46 +10:00
bofdahof
65619fae39 remove using namespace boost::program_options 2025-03-08 13:20:32 +10:00
bofdahof
00173ebe02 remove using namespace std 2025-03-08 13:18:06 +10:00
bofdahof
f66561b23a remove using namespace boost 2025-03-08 13:14:35 +10:00
bofdahof
00ce73dc45 remove using namespace Base 2025-03-08 13:13:38 +10:00
Chris Hennes
50e80f4a03 Merge pull request #20052 from mosfet80/CleanPython
removed old python code <3.10
2025-03-08 01:10:58 +00:00
Chris Hennes
a028d8d299 Merge pull request #20058 from tritao/fix-app-document-main-doc-load
App: Fix regression for document creation requests coming from the main document.
2025-03-07 23:28:27 +00:00
mos
c70a7933e6 Removed old Python code <3.10 2025-03-07 16:34:08 -06:00
Joao Matos
668b0acc00 App: Fix regression when creating new document coming from the main document. 2025-03-07 20:54:16 +00:00
Joao Matos
9bcdd2d44c Rename DocumentCreateFlags to DocumentInitFlags. 2025-03-07 20:54:16 +00:00
Joao Matos
d6510061b3 App: Fix memory leak regression in ApplicationPy::newDocument. 2025-03-07 20:42:51 +00:00
Joao Matos
1c2ac570f8 Convert DocumentCreateFlags instances to use designated initializer list. 2025-03-07 20:42:51 +00:00
Chris Hennes
750d8c6a96 App: Cleanup parameter names in Application.*
* Unify names in header and cpp files
* Make names consistent across methods with similar uses
* Fix spacing

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2025-03-07 08:47:49 -06:00
Benjamin Nauck
a0a64c1fb8 Base: Make Type::importModule private 2025-03-06 20:50:04 +01:00
Kevin Martin
a0d0fc1498 Only do Label Change notification if the label truly changes
The code for setting the value of a Label property would do a quick return if the new label was equal to the current one, but otherwise the proposed new label might be modified to make it unique. If the modified new value were equal to the current value, a Change notification would still be generated. This no longer occurs.
2025-03-05 22:23:43 -05:00
Kevin Martin
bf55e4e258 Deregister DocumentObject's Label before deleting the object
Under certain circumstances the existing code would try to obtain the Label of a DocumentObject after that object had been deleted, causing an access to freed memory and failing to deregister the Label. The latter would lead to phanton Label collisions and unexpected generation of unique labels.
2025-03-05 22:23:42 -05:00
Chris Hennes
b090e27dcf App: Switch to isNullOrEmpty() 2025-03-03 19:24:15 -06:00
Chris Hennes
66e1710956 App: Minor formatting from review
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2025-03-03 19:21:05 -06:00
bofdahof
091f73f09f Calling static via instance 2025-03-03 19:21:04 -06:00
bofdahof
035d789ffa Narrowing conversion 2025-03-03 19:21:04 -06:00
bofdahof
3ddf2fe67b Don't use endl 2025-03-03 19:21:04 -06:00
bofdahof
4811be9881 Reserve vector size 2025-03-03 19:21:04 -06:00
bofdahof
8ff4b1b018 Redundant c_str() 2025-03-03 19:21:04 -06:00
bofdahof
31825c28aa Else after return 2025-03-03 19:21:04 -06:00
bofdahof
4bfe65b48c Declaration hides previous 2025-03-03 19:21:04 -06:00
bofdahof
ee849b6349 C++ style cast instead of C 2025-03-03 19:21:04 -06:00
bofdahof
78696bdaee Join declaration and assignment 2025-03-03 19:21:04 -06:00
bofdahof
2ab03306ca Use auto 2025-03-03 19:21:04 -06:00
bofdahof
c3eee2dc99 Simplify expression 2025-03-03 19:21:04 -06:00