Commit Graph

437 Commits

Author SHA1 Message Date
Chris Hennes
a4a1ef7294 App: Get Addon name from Metadata 2026-02-02 19:50:16 +01:00
Ladislav Michl
0831f7e392 App: Avoid C string compare
Since we are linking to boost anyway, use boost function for case
insensitive string compare. While there, make affected methods accept
std::string arguments, which simplifies code a bit.
2026-01-30 10:58:09 +01:00
wmayer
2799aa2700 App: Simplify and fix code for ifcopenshell version check 2026-01-30 10:56:05 +01:00
Pieter Hijma
d4a115df06 [Doc] Improve the App::Application documentation 2026-01-12 09:38:42 +01:00
tritao
69058376e6 Base: Remove Boost-based signals and switch to FastSignals. 2026-01-07 21:16:16 +00:00
PhoneDroid
8abd25c999 [ App ]: Update SPDX License Identifiers 2025-12-25 11:55:37 -06:00
sliptonic
79640fd18a Merge pull request #23885 from chennes/pythonInterfaceToApplicationDirectories
App: Add Python interface to ApplicationDirectories
2025-09-17 18:11:41 -05:00
Markus Reitböck
d05e2a0431 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
Chris Hennes
0dcbac7b30 App: Add Python interface to ApplicationDirectories
The Python version of this class is entirely static: no instance is
required. Internally it accesses th pre-constructed instance of the C++
ApplicationDirectories class that is instantiated at program startup by
the Application class.
2025-09-12 15:25:47 -05:00
Ladislav Michl
e7cd72b2e0 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
62ec6f773c App: Fix safe mode and home directory 2025-09-02 21:39:09 +02:00
luzpaz
e1dcb21165 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
102d0a9ac8 App: refactor to use unique_ptr
Also address other reviewer comments.
2025-08-27 11:51:22 -05:00
Chris Hennes
58126c20e2 App: Fix problems with temp dir creation 2025-08-27 11:51:22 -05:00
Chris Hennes
25f8a1eb57 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
594acbb6a5 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
8ec43d2966 App: Remove build dependency to Coin3D
Fixes https://github.com/FreeCAD/FreeCAD/issues/20897
2025-08-24 22:18:55 -05:00
qewer33
a4d4a8e7d6 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
6e3135c08d 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
65fe3b8558 Add Navigation Style/Orbit Style/Rotation Mode to About info
Closes #17431
2025-05-19 17:45:00 +02:00
bofdahof
998f4e4d45 Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Ladislav Michl
c293d74566 Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
Chris Hennes
9b1467cef3 Merge pull request #20540 from 3x380V/cleanup-schemas-management
Simplify UnitsSchemas management
2025-05-05 10:43:27 -05:00
Benjamin Nauck
65ee1339de App: use contains() instead of count() where possible 2025-05-03 22:19:51 +02:00
bofdahof
1155f0d752 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
6be09c29f6 App: Use the legacy macOS version functionality for About FreeCAD dialog (#20858) 2025-04-18 06:41:18 +02:00
bofdahof
3e24dc6d8c Remove unused code: verbosity 2025-04-17 08:38:38 +02:00
Alex Tran
989a06ea63 App: Running FreeCAD in verbose mode information to reflect Gui -> Help -> About Dialog info (#20487) 2025-04-16 08:29:07 +02:00
bofdahof
7013f913b6 App: remove redundant qualifier from Application class 2025-04-07 11:09:04 +02:00
bofdahof
6b5030f391 App: constify variables in Application class 2025-04-07 11:09:04 +02:00
Kacper Donat
f5199145a4 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
406a834a6d Base: Add volume charge density unit 2025-03-27 21:13:21 +01:00
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
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
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
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
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
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
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