Commit Graph

39 Commits

Author SHA1 Message Date
Andrea
de9bd5e1ce change MIN_boost_version
ubuntu version 20.04 is no longer supported.
The minimum boost version used for freecad is now 1.74 (ubuntu 22.04) https://launchpad.net/ubuntu/jammy/+package/libboost-system-dev
2025-02-15 13:33:32 -06:00
wmayer
5771c94523 App: Apply clang format (part 2) 2024-11-21 21:17:42 +01:00
bgbsww
5afdc19874 Toponaming: Cleanup 2024-07-21 17:40:42 -04:00
Zheng, Lei
c9232b141a Toponaming: Transfer in getLinksTo 2024-07-21 17:36:50 -04:00
wmayer
8f3fcd540a MSYS: fix CMake configure and build for MinGW 2023-12-03 18:02:07 +01:00
wmayer
ee0fad4c90 App: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
3e35b5f606 App: modernize C++: use equals default 2023-08-20 18:10:17 +02:00
luz paz
0e08b51a58 App: fix trailing whitespace 2022-12-02 19:19:17 -06:00
wmayer
5240a30431 App: modernize C++: replace 'typedef' with 'using' 2022-08-29 12:58:39 +02:00
berniev
d66df602ad App: Single arg ctors must be explicit 2022-08-24 07:20:57 +02:00
wmayer
7c6b6a3942 App: fix -Winconsistent-missing-override 2022-08-01 01:14:19 +02:00
berniev
65a356835b App: Modernise ctors dtors defs etc 2022-08-01 00:34:46 +02:00
berniev
b40de7a509 remove redundant void 2022-07-31 10:27:44 +02:00
wmayer
9b2b0e0acf modernize C++: replace boost::function with std::function 2022-06-30 20:31:55 +02:00
Christoph Moench-Tegeder
60e419068b fix Expressions assignment for FreeBSD
Just like Apple, FreeBSD uses clang as it's main compiler, and thus
runs afoul of the same problem in src/App/PropertyExpressionEngine.cpp
like Apple (issue #5281): "error: no viable overloaded '='".
Extend the fix from #5281 for the BSDs (check macro FC_OS_BSD) -
at least OpenBSD uses clang, too (maybe this check should be reworked
to test for clang, but I can't test on Apple, so let's keep this fix
minimalistic).

References: #5281
2022-06-19 16:14:10 +02:00
wmayer
749361d2f3 App: modernize C++11
* use nullptr
2022-03-23 17:29:23 +01: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
4ae1ca58d1 App: use forward declaration to reduce compile time 2022-03-04 17:27:53 +01:00
Uwe
c7910825a3 [App] Placement and Property: remove unused includes 2022-02-24 01:09:00 +01:00
Benjamin Alterauge
bb5c3d2091 Use std::map without const 2021-12-30 17:40:45 +01:00
Benjamin Alterauge
458ae2307c Spreadsheet: Fix trouble with clang and MacOS
Since the Spreadsheet: support cell binding commit, I got trouble by building freecad. I didn't find similar reports in install/compile forum. So I will only use the old version of typedef for macos. Better solutions are welcome.

See [trouble details](68fca40983 (commitcomment-62364932))
2021-12-30 17:40:45 +01:00
Zheng, Lei
68fca40983 Spreadsheet: support cell binding
Cell binding allows one to bind a range of cells of one sheet to another
range of cells of an arbitary sheet, including any empty cells in the
range.

The binding is implemented with PropertyExpressionEngine and
PropertySheet::setPathValue(), which binds a special path of
PropertySheet, such as

    .cells.Bind.A1.D1

to an expression, such as

     tuple(.cells, <<A2>>, <<A5>>)

The A1 and D1 in the example above specifies the binding start and end
cell address. And <<A2>> and <<A5>> are the range of cells to bind to.
Note that you can use any expression that evalutes to string for the
binding destination, e.g. <<A%d>> % B1, which uses the value inside B1
to construct the binding destination. The '.cells' in the tuple shown
above is an example to bind cells of the same PropertySheet. It can be
change to to reference to any other spreadsheet, even those outside the
current document, e.g. Document#Spreadsheet001.cells
2021-12-21 21:41:02 -07:00
Zheng, Lei
14dfae0597 App: add hiddenref() expression built-in function
Any object reference inside this function is treated as hidden to
exclude it from dependency calculation. This function allows some form
of cyclic depdenency.

Merger note: renamed from "HREF" to "HIDDENREF" to avoid confusion with
the standard "hypertext reference" use of HREF.
2021-11-14 20:45:09 -06:00
Benjamin Nauck
a7f0d0112e [App] Use std::shared_ptr instead of boost::shared_ptr
There's no need to use boost version when stl has support for shared_ptr
2021-03-06 19:32:03 +01:00
wmayer
0f31c87cc9 Boost: [skip ci] Fix build warnings from deprecated Boost headers (v1.75) 2020-12-29 15:34:25 +01:00
Mateusz Skowroński
2559f2d29c Fix build warnings from deprecated Boost headers (they are used internally by Boost). Thanks @wwmayer for the hint. 2020-12-29 10:20:53 +01:00
luz.paz
4f308dc03c src/App: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/App` files
2019-12-25 11:38:43 +01:00
wmayer
3e6ae0d027 Fix clang compiler warnings:
+ fix -Winconsistent-missing-override
+ fix -Wunused-private-field
+ suppress -Woverloaded-virtual but fix later
2019-08-17 19:51:51 +02:00
Zheng, Lei
93e60caa35 PropertyExpressionEngine: convert to link type property
PropertyExpressionEngine is changed to derived from a new class
PropertyExpressionContainer, which is in turn derives from
PropertyXLinkContainer. This makes PropertyExpressionEngine a link type
property that is capable of external linking. It now uses the unified
link property APIs for dependency management and tracking of object
life time, re-labeling, etc.

ObjectIdentifier is modified to support sub-object reference, but is
not exposed to end-user, because expression syntax is kept mostly
unchanged, which will be submitted in future PR. There is, however,
one small change in expression syntax (ExpressionParser.y) to introduce
local property reference to avoid ambiguity mentioned in
FreeCAD/FreeCAD#1619

Modified Expression/ExpressionModifier interface to support various link
property API for link modification.
2019-08-17 14:52:09 +02:00
wmayer
f898eafd64 move from deprecated boost.signals to boost.signals2 library 2018-10-30 19:09:03 +01:00
luz.paz
125f41e3e8 Misc. typo fix
Found via `codespell`
2018-10-11 16:21:28 -04:00
wmayer
114cdc6822 0003279: Error 'invalid DAG' after deleting sketch using expressions 2018-01-31 00:27:38 +01:00
Eivind Kvedalen
009d0c03b4 Document/PropertyExpressionEngine: Added onDocumentRestored function, to update internals of PropertyExpressionEngine after loading a document from disk. 2016-01-08 23:08:55 +01:00
Eivind Kvedalen
df660dc280 PropertyExpressionEngine/DocumentObject: Track object deletes and update dependencies accordingly. 2015-12-21 14:11:13 +01:00
Stefan Tröger
4203a6f35b Expressions: Integrate into the property editor
- basic infrastructure for handling of expressions
- port the unit properties editor to support expressions
- port placement editor to support expressions
- expressions for double spinbox
- expressions in sketch constraints
2015-12-09 14:08:48 +01:00
wmayer
e4768c1c75 + fix clang warning: -Woverloaded-virtual 2015-10-02 20:42:16 +02:00
Eivind Kvedalen
cab8111292 Removed PropertyExpressionEngine::getPaths() method. 2015-09-30 15:54:16 +02:00
wmayer
e786cfbc90 + reimplement virtual methods in PropertyExpressionEngine 2015-09-25 00:52:44 +02:00
Eivind Kvedalen
8259ec6764 Added PropertyExpressionEngine class. 2015-09-21 14:51:05 +02:00