Commit Graph

429 Commits

Author SHA1 Message Date
Markus Reitböck
73c97bc90f App: 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:02 +02:00
Ladislav Michl
0278a1298d Base: refactor unit formatting defaults
Defaults for both precision (number of digits after decimal point)
and denominator (number of fractions) are defined on various places
making difficult to find which default is used for various tasks.
Store these values at one central place: UnitsApi. Unless overriden
by user, default values are defined by unitSchemasDataPack.
2025-09-05 17:31:54 +02:00
Chris Hennes
4fbe8e1773 App: Fix safe mode and home directory 2025-09-02 21:39:09 +02:00
luzpaz
b7959450f2 AddonManager: ignore everything but dirs in getVerboseAddOnsInfo
Before this PR addon manager was displaying manifest.json files along with backup files. Now those are ignored.
Fixes #23545
2025-09-01 22:32:23 -05:00
Chris Hennes
fa98beb221 App: refactor to use unique_ptr
Also address other reviewer comments.
2025-08-27 11:51:22 -05:00
Chris Hennes
5c7a44d7d8 App: Fix problems with temp dir creation 2025-08-27 11:51:22 -05:00
Chris Hennes
3426c9ff21 App: Migrate directory handling to helper class
Use std::filesystem wherever possible, replacing most uses of
std::string when the object is actually a path. This is the first stage
of refactoring, and does not make any changes to Application that affect
client code. Access to the new directory-handling class is implemented,
but is unused by any external code.
2025-08-27 11:51:22 -05:00
drwho495
3ee1e3335f Toponaming: Remove updateElementReferences call in PropertyLinkSub (#23263)
* remove updateElementReferences call in PropertyLinkSub

* Retrigger checks

* update element refs after the document has restored
2025-08-25 21:39:40 -05:00
wmayer
c15e46348d App: Remove build dependency to Coin3D
Fixes https://github.com/FreeCAD/FreeCAD/issues/20897
2025-08-24 22:18:55 -05:00
qewer33
164ecfebac Gui: Add about image for dev version
Co-authored-by: ein-shved <yury.shvedov@kaspersky.com>
Co-authored-by: Ladislav Michl <ladis@triops.cz>
Co-authored-by: qewer33 <qewer33@proton.me>
Co-authored-by: 3x380V <i58604845+3x380V@users.noreply.github.com>
2025-08-05 17:33:05 -05:00
Benjamin Nauck
1cf0f8570d App: Trim “Gui::” and “NavigationStyle” more securely
By using regex we can remove prefix and suffix more securely as we can’t assume all navigation styles are formatted the same (mistakes can happen)
2025-06-16 11:07:40 -05:00
xtemp09
712de69f73 Add Navigation Style/Orbit Style/Rotation Mode to About info
Closes #17431
2025-05-19 17:45:00 +02:00
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Ladislav Michl
9683cf1e4f Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
Chris Hennes
f55063855a Merge pull request #20540 from 3x380V/cleanup-schemas-management
Simplify UnitsSchemas management
2025-05-05 10:43:27 -05:00
Benjamin Nauck
02d095f6e2 App: use contains() instead of count() where possible 2025-05-03 22:19:51 +02:00
bofdahof
353acbb27b Base: simplify UnitsSchemas management
Fixes: Maintaining schemas is difficult and error-prone

- Facilitate easy schemas add, remove, change, etc.
- Remove 14 files containing approx 2,190 lines of if/else code and data
- Place data in one file (UnitsSchemasData.h) using a normalized structure (including special functions)
- Isolate and simplify data operations (code)
- Remove schemas enum to keep data independent of code
- Separate responsibilities: Specifications, data, schemas, schema
- Add schema data 'isDefault'
- Add schema data name
- Prefer algorithms to raw loops
- Add schemas unit tests
- Tweak quantity unit tests
2025-04-27 00:45:54 +02:00
Jackson Oursland
8d679b70f0 App: Use the legacy macOS version functionality for About FreeCAD dialog (#20858) 2025-04-18 06:41:18 +02:00
bofdahof
09d08593ed Remove unused code: verbosity 2025-04-17 08:38:38 +02:00
Alex Tran
353085d7e3 App: Running FreeCAD in verbose mode information to reflect Gui -> Help -> About Dialog info (#20487) 2025-04-16 08:29:07 +02:00
bofdahof
ccaabc46eb App: remove redundant qualifier from Application class 2025-04-07 11:09:04 +02:00
bofdahof
80a382e126 App: constify variables in Application class 2025-04-07 11:09:04 +02:00
Kacper Donat
d7adbe5f3d Merge pull request #20379 from chennes/baseEliminatePy_GetPath
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-29 18:13:08 +01:00
marioalexis
1c19608799 Base: Add volume charge density unit 2025-03-27 21:13:21 +01:00
Chris Hennes
5941c7e0ba 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
Thomas Gimpel
b86c7c4a8f App: reverted commit 8ff4b1b and improved comments in order to fix the MacOS build (#20068) 2025-03-17 20:23:01 +01:00
bofdahof
b0d34801db cleanup commented lines 2025-03-08 13:37:46 +10:00
bofdahof
7b3b7068ca remove using namespace Base::FileInfo 2025-03-08 13:37:46 +10:00
bofdahof
bfe6d21163 remove using namespace boost::program_options 2025-03-08 13:20:32 +10:00
bofdahof
1dc20ee0d6 remove using namespace std 2025-03-08 13:18:06 +10:00
bofdahof
7a69a7d8c3 remove using namespace boost 2025-03-08 13:14:35 +10:00
bofdahof
5f691bee69 remove using namespace Base 2025-03-08 13:13:38 +10:00
Chris Hennes
144b44f2db 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
Joao Matos
08564607c2 App: Fix regression when creating new document coming from the main document. 2025-03-07 20:54:16 +00:00
Joao Matos
6dd5246fa1 Rename DocumentCreateFlags to DocumentInitFlags. 2025-03-07 20:54:16 +00:00
Chris Hennes
caccda384b 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
Chris Hennes
070e2cc8fa App: Switch to isNullOrEmpty() 2025-03-03 19:24:15 -06:00
Chris Hennes
94adb6b28b App: Minor formatting from review
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2025-03-03 19:21:05 -06:00
bofdahof
9f880497ed Calling static via instance 2025-03-03 19:21:04 -06:00
bofdahof
80b3a7e3de Narrowing conversion 2025-03-03 19:21:04 -06:00
bofdahof
9d11fb9079 Don't use endl 2025-03-03 19:21:04 -06:00
bofdahof
65895ae0ed Reserve vector size 2025-03-03 19:21:04 -06:00
bofdahof
e5497af44b Redundant c_str() 2025-03-03 19:21:04 -06:00
bofdahof
f6f759a992 Else after return 2025-03-03 19:21:04 -06:00
bofdahof
e1eb7e6643 Declaration hides previous 2025-03-03 19:21:04 -06:00
bofdahof
0a4d9a2b37 C++ style cast instead of C 2025-03-03 19:21:04 -06:00
bofdahof
bffdf7feb2 Join declaration and assignment 2025-03-03 19:21:04 -06:00
bofdahof
1e4cecdc07 Use auto 2025-03-03 19:21:04 -06:00
bofdahof
a1c9ed4385 Simplify expression 2025-03-03 19:21:04 -06:00
bofdahof
668aaf7511 DRY 2025-03-03 19:20:59 -06:00