Commit Graph

147 Commits

Author SHA1 Message Date
bgbsww
e0e1cb565a Correctly build reference from selection subname 2024-09-24 22:01:14 -04:00
bgbsww
e4a509cc77 Toponaming: Remove all FC_USE_TNP_FIX protected old code 2024-08-26 11:12:48 -05:00
bgbsww
077f3b3ab4 Toponaming: Clean code, apply remark recommendations and Tweak tests 2024-07-22 12:55:23 -04:00
bgbsww
ee72afc51d Refactor all element name pairs into clearer struct names - renames 2024-07-21 20:32:58 -04:00
bgbsww
678f35fda2 Toponaming: Cleanup 2024-07-21 17:40:42 -04:00
bgbsww
19e450a667 Refactor all element name pairs into clearer struct names - renames 2024-07-20 16:32:12 -04:00
bgbsww
e07d940f5b Toponaming: Process mapped names during selection 2024-07-15 10:45:43 -05:00
PaddleStroke
8ed26133ab Core: Add App::PropertyXLinkSubHidden 2024-07-10 10:29:03 +02:00
bgbsww
53ad95b382 Toponaming: bring in missing code fragments in App 2024-05-12 17:21:49 -04:00
bgbsww
920032c5a0 Lint corrections 2024-05-03 12:07:02 -04:00
bgbsww
b80d628c69 Merge branch 'main' into bgbsww-toponamingMissingAppMethods 2024-05-02 22:43:36 -04:00
bgbsww
4a0df0ea6d Test for changed Sketches avoiding TNP 2024-05-01 20:29:26 -04:00
Zheng, Lei
56e32b9c98 Methods to support Toponaming element maps 2024-05-01 18:02:04 -04:00
André Caldas
89dbab9b0e Avoids using getNameInDocument() to test if DocumentObject is attached to a Document.
This patch substitutes by isAttachedToDocument() (almost) everywhere where
getNameInDocument() is used for this purpose.

The very few places not touched by this patch demand a (just a little) less trivial change.
When we change the returning type of getNameInDocument() to std::string,
those places will be easily found, because they shall generate a compiler error
(converting std::string to bool).

Rationale:
The fact that getNameInDocument() return nullptr to indicate
that the object is not attached to a document is responsible for lots of bugs
where the developer does not check for "nullptr".

The idea is to eliminate all those uses of getNameInDocument() and, in the near future,
make getNameInDocument() return always a valid std::string.
2023-12-11 17:37:58 +01:00
Florian Foinant-Willig
741296b82e Core: modernize type checking 2023-10-23 18:07:07 +02:00
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