Commit Graph

132 Commits

Author SHA1 Message Date
wmayer
1cf1a90a17 App: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
af8c05c507 App: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
wmayer
4991475341 App: modernize C++: use range-based for loop 2023-08-14 16:40:25 +02:00
wmayer
948cbfccd9 modernize C++: avoid bind
In many cases std::bind() is kept because the code is much simpler
2023-08-08 21:10:16 +02:00
wmayer
52e1c7c33b modernize C++: move from boost::bind to std::bind 2023-08-08 17:36:13 +02:00
wmayer
ec73caa40e modernize C++: make unique 2023-08-07 19:51:30 -06:00
wmayer
3f2fe95308 App: [skip ci] fix memory leak 2022-11-14 19:42:33 +01:00
Uwe
a25bdf15b9 use explicit prefix std:: for vectors
- also add potentially missing include
- this commit is an attempt to fix #7585
2022-10-11 01:44:24 +02:00
marioalexis
7aa200b965 App: Check Python types using Base::PyTypeCheck 2022-09-24 05:10:34 +02:00
marioalexis
209c78d43e App: Replace C cast 2022-09-18 11:06:51 -05:00
wmayer
656890be38 App: modernize C++: replace 'typedef' with 'using' 2022-08-29 12:58:39 +02:00
berniev
d2babf0eb5 App: Single arg ctors must be explicit 2022-08-24 07:20:57 +02:00
berniev
22dcf5866f App: use empty 2022-08-06 19:29:59 +02:00
berniev
ac81a8380f App: use emplace_back 2022-08-05 10:31:51 +02:00
berniev
b6cae3bfdf App: Modernise ctors dtors defs etc 2022-08-01 00:34:46 +02:00
berniev
85170b2879 remove redundant void 2022-07-31 10:27:44 +02:00
wmayer
9b30f9328b Fix several clazy issue:
* Suppress non-POD static [-Wclazy-non-pod-global-static]
* Call to temporary is a no-op: [-Wclazy-writing-to-temporary]
* Unused QString [-Wclazy-unused-non-trivial-variable]
2022-07-24 21:39:59 +02:00
andrea
61a5551940 Remove unused code into App 2022-07-23 14:27:50 +02:00
Uwe
32ffcc7eda [App] code style fixes by MSVC
- automatic .clang fixes while checking for nullptr, no actual code change
2022-07-18 13:03:42 +02:00
Uwe
e69a920f18 [App] remove superfluous nullptr checks 2022-07-18 03:12:01 +02:00
mosfet80
c48a569696 Boost version <=1.60 is never used in freecad 0.20 (#7038)
* Boost version 1.60 is never used in freecad 0.20
2022-06-24 02:20:26 +02:00
Zheng, Lei
f0e46ff71c App/Gui: Fix auto checking 'Sync sub object' if property link editor
Related FreeCAD/FreeCAD#6672 case C
2022-04-10 14:31:25 +02:00
Zheng, Lei
236de5904d App: fix PropertyXLinkSubList::getLinks()
Originally getLinks() missed entries without subname/sub-element

Related FreeCAD/FreeCAD#6672 case B
2022-04-10 14:31:25 +02:00
Uwe
2cea4dc1b8 [skip CI] [App] PropertyLinks: fix line endings 2022-04-09 06:36:43 +02:00
Chris Hennes
f7edc74eee App: PR6497 move return statement to new line 2022-03-29 12:33:37 -05:00
wmayer
1a20b7f119 App: modernize C++11
* use nullptr
2022-03-23 17:29: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
1cbecdf122 App: use forward declaration to reduce compile time 2022-03-04 17:27:53 +01:00
Uwe
d88397f3d6 [App] Placement and Property: remove unused includes 2022-02-24 01:09:00 +01:00
wmayer
b35623e680 App: Bugfix for NULL-Pointer dereference of Property->getName() 2022-01-16 14:30:51 +01:00
wmayer
54047878ac App: [skip ci] fix Property::isSame() and subclasses by first comparing the pointers directly 2022-01-07 17:09:08 +01:00
Zheng, Lei
54c484df9b App: add Property::isSame() API
To compare if two property contains the same content. The default
implementation in Property uses the persistense interface to save both
properties to string and compares the content. This may not work at the
moment if the property saves content in separate file or in binary.

Various properties have cheaper implementation to direct compare their
internal values.
2021-12-21 21:41:02 -07:00
Zheng, Lei
32e3eaa01b App: fix subname encoding when saving property links 2021-11-21 23:35:40 -06:00
wmayer
d6b17b2dbb App: add PropertyLinkSubList::addValue() to extend the list 2021-11-15 13:05:19 +01:00
wmayer
744290467d App: add PropertyLinkSubList::verifyObject() to reduce code duplication 2021-11-15 08:42:32 +01:00
Zheng, Lei
fdae470c1b 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
wmayer
8dc4c857f0 App: add upgrade() method to PropertyLinkSubList 2021-11-12 07:49:44 +01:00
Zheng, Lei
ad9ad30c00 App: fix external document loading
The problem happens when partial loading is enabled. If document A
contains a link to some object in document B, it will load B as partial
document with only that object and its necessary dependencies. But if
document A contains another link to some object in document C which also
has a link to some object in document B, the link in document C may not
be restored, because document B is partially loaded without the linked
object. This patch will check for this case and reload document B for
more objects.

See an example reported in
https://forum.freecadweb.org/viewtopic.php?p=495078#p495078
2021-10-30 11:03:52 +08:00
Chris Hennes
373246858e [App] Fix LGTM warning decl hides param 2021-09-19 12:31:24 -05:00
wmayer
d17b061fea App: [skip ci] check object status before accessing back links 2021-02-22 17:31:25 +01:00
wmayer
0e5cbf5298 Py2/Qt4: fix build failures and warnings 2020-11-30 19:05:37 +01:00
wmayer
23059c13d3 PyCXX: [skip ci] fix compiler warnings due to changes on PyCXX 2020-11-25 16:52:46 +01:00
luz paz
84553bf191 App: Fix header uniformity, trailing whitespace, and doxygen headers 2020-11-19 13:38:37 +01:00
wmayer
25b1f21d2d App: simplify the logic in PropertyLinkList::getPyValue 2020-11-18 18:21:15 +01:00
Chris Hennes
e222461e85 Modify PropertyLinkList to accept None from Python. 2020-11-18 18:11:11 +01:00
Zheng, Lei
d321ed9f0e App: fix PropertyXLink handling on symlink file path 2020-08-31 14:05:14 +02:00
wmayer
5b1343f5a9 typos: [skip ci] 2020-08-30 14:51:55 +02:00
wmayer
98e936689e App: fix crash due to incorrect usage of std::mismatch 2020-08-22 20:25:10 +02:00
Jean-Marie Verdun
7883aad3ab Add App::Link support to Cloud module
ONLY enabled if the Cloud Module is compiled into FreeCAD
    ALL files must be saved into a Cloud Based storage
    Add a Signal to the PropertyLink to enable support of external storage
    Put the Assembly Document as active document

Signed-off-by: Jean-Marie Verdun <jmverdun3@gmail.com>
2020-07-23 13:47:21 +02:00
wmayer
0a6929a122 Coverity: Dereference after null check 2020-07-20 17:34:25 +02:00