Kacper Donat
b300c80b90
Base: Use explicit pointer syntax for freecad_cast ( #20694 )
...
* Base: Use explicit pointer syntax for freecad_cast
This aligns our custom cast with other casts
* All: Use explicit pointer syntax for freecad_cast
2025-04-11 14:11:33 +00:00
Kacper Donat
35a9673a75
Base: Rename Base::freecad_dynamic_cast into freecad_cast
...
This is to make it shorter and easier to use. QT does the same thing
with their qobject_cast.
2025-04-07 10:32:28 -05:00
Chris Hennes
837f6fa788
App: Change element name warning to log
2025-04-01 23:57:13 +02:00
Chris Hennes
867e4507cc
App: Prevent exceptions in destructors
...
Coverity issues 251332 and 356538. These destructors call methods
that could throw exceptions. Catch them and convert to console
print statements to prevent calls to `terminate()`.
2025-03-23 08:52:44 +01:00
Chris Hennes
c252f40b6f
App: Don't use std::forward inside loop
...
std::forward implies that sometimes its argument will be *moved*, leaving it invalid in the calling code. If that call is inside a loop that tries to reuse the data we have undefined behavior.
2025-03-22 07:15:15 +01:00
xtemp09
6cfec14545
[App] Fix the crash reported in #20212
2025-03-19 00:23:22 -03:00
Joao Matos
006feaf276
App: Remove old DAG implementation.
2025-02-28 14:32:32 +00:00
Kacper Donat
12a69fe296
Base: Add isNullOrEmpty string helper
...
This adds isNullOrEmpty string helper that cheks if string is... well
null or empty. It is done to improve readability of the code and better
express intent.
2025-02-21 15:04:43 +01:00
Benjamin Nauck
dd6aa9f3c7
Prefer to use BaseClass's isDerivedFrom<T> over non template or Base::Type's
...
Regex based changes, manually verified
2025-01-27 16:08:18 +01:00
wmayer
5771c94523
App: Apply clang format (part 2)
2024-11-21 21:17:42 +01:00
bgbsww
f0053e5388
Correctly build reference from selection subname
2024-09-24 22:01:14 -04:00
bgbsww
ecf7e51ab3
Toponaming: Remove all FC_USE_TNP_FIX protected old code
2024-08-26 11:12:48 -05:00
bgbsww
0178e848e4
Toponaming: Clean code, apply remark recommendations and Tweak tests
2024-07-22 12:55:23 -04:00
bgbsww
97473a838f
Refactor all element name pairs into clearer struct names - renames
2024-07-21 20:32:58 -04:00
bgbsww
5afdc19874
Toponaming: Cleanup
2024-07-21 17:40:42 -04:00
bgbsww
0bddc51805
Refactor all element name pairs into clearer struct names - renames
2024-07-20 16:32:12 -04:00
bgbsww
7daa22fcc7
Toponaming: Process mapped names during selection
2024-07-15 10:45:43 -05:00
PaddleStroke
31beda6f09
Core: Add App::PropertyXLinkSubHidden
2024-07-10 10:29:03 +02:00
bgbsww
71892a1d72
Toponaming: bring in missing code fragments in App
2024-05-12 17:21:49 -04:00
bgbsww
2bff3f5343
Lint corrections
2024-05-03 12:07:02 -04:00
bgbsww
d861b81c51
Merge branch 'main' into bgbsww-toponamingMissingAppMethods
2024-05-02 22:43:36 -04:00
bgbsww
f9b65e563d
Test for changed Sketches avoiding TNP
2024-05-01 20:29:26 -04:00
Zheng, Lei
47635c0507
Methods to support Toponaming element maps
2024-05-01 18:02:04 -04:00
André Caldas
560898907b
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
773c701eec
Core: modernize type checking
2023-10-23 18:07:07 +02:00
wmayer
ee0fad4c90
App: modernize C++: use default member init
2023-08-23 19:51:44 +02:00
wmayer
89bdd489b0
App: modernize C++: return braced init list
2023-08-18 00:36:24 +02:00
wmayer
26f16f7410
App: modernize C++: use range-based for loop
2023-08-14 16:40:25 +02:00
wmayer
d150fa7164
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
68d22d864b
modernize C++: move from boost::bind to std::bind
2023-08-08 17:36:13 +02:00
wmayer
0af4990817
modernize C++: make unique
2023-08-07 19:51:30 -06:00
wmayer
6e7ee14062
App: [skip ci] fix memory leak
2022-11-14 19:42:33 +01:00
Uwe
a96a3a505f
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
5cb31ece93
App: Check Python types using Base::PyTypeCheck
2022-09-24 05:10:34 +02:00
marioalexis
9ccb9eecb2
App: Replace C cast
2022-09-18 11:06:51 -05: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
berniev
1cc6329eab
App: use empty
2022-08-06 19:29:59 +02:00
berniev
e7357c1a99
App: use emplace_back
2022-08-05 10:31:51 +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
bf7e6aac4a
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
0c4c3cc786
Remove unused code into App
2022-07-23 14:27:50 +02:00
Uwe
142cfce9f7
[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
fa36a57724
[App] remove superfluous nullptr checks
2022-07-18 03:12:01 +02:00
mosfet80
620c273c4e
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
15c59d6007
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
9242355c8c
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
7ddf10df45
[skip CI] [App] PropertyLinks: fix line endings
2022-04-09 06:36:43 +02:00
Chris Hennes
132a1d7e55
App: PR6497 move return statement to new line
2022-03-29 12:33:37 -05:00